473,322 Members | 1,778 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

How to compile a UTF-8 resource file

Hello, All.

I have a UTF-8 resource file which contrains all the
translatable strings. when I compile it, I will get "RC :
fatal error RC1205 : invalid code page". Here is the
command I used:

rc /x /v /cUTF-8 testResource.rc

Can someone tell me what is the valid code page for "UTF-
8" or point me to the right place where I can look it up
myself?

Thanks very much,
Zheng Huang

Jul 19 '05 #1
3 4108
> I have a UTF-8 resource file which contrains all the
translatable strings. when I compile it, I will get "RC :
fatal error RC1205 : invalid code page". Here is the
command I used:

rc /x /v /cUTF-8 testResource.rc


The resource compiler does not support UTF8.
It does support UTF16 with BOM though.
Without parameters, it will detect the BOM (byte oder mark).

Mihai
Jul 19 '05 #2
Thanks, Mihai, for your tips.

When I use the compiled resoure file (UTF-16), VB still
does not display the Swedish character correctly. I have a
character ä in the resource file. When I use "MsgBox
(LoadResString(100)), it displays ä .
Can you tell me what I am missing?

Thanks in advance,
Zheng

-----Original Message-----
I have a UTF-8 resource file which contrains all the
translatable strings. when I compile it, I will get "RC : fatal error RC1205 : invalid code page". Here is the
command I used:

rc /x /v /cUTF-8 testResource.rc
The resource compiler does not support UTF8.
It does support UTF16 with BOM though.
Without parameters, it will detect the BOM (byte oder

mark).
Mihai
.

Jul 19 '05 #3

ä encoded as UTF8 is ä
It looks like you RC file is UTF8, then you compile it as ANSI.

Make sure you save it as UTF16
(from Notepad select "Save as..." and chose Unicode as file type)
Then compile using
/l 0x41d (to indicate Swedish)
No need to use /c, the BOM added by Notepad will do the trick

Another option, if you want Swedish, is to use the 1252 encoding,
the ANSI one for Swedish.
(from Notepad select "Save as..." and chose Text as file type)
Then compile it using
/c 1252 (to indicate the code page)
and
/l 0x41d (to indicate Swedish)

Mihai
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: lawrence | last post by:
Someone on www.php.net suggested using a seems_utf8() method to test text for UTF-8 character encoding but didn't specify how to write such a method. Can anyone suggest a test that might work?...
2
by: Denis S. Otkidach | last post by:
I have 2 questions about compile 1. What is the reason to encode source code to utf-8? I guess "python -U" behavior is the best choice in this case. The following snippet seems to fix this,...
8
by: janeaustine50 | last post by:
Python's InteractiveInterpreter uses the built-in compile function. According to the ref. manual, it doesn't seem to concern about the encoding of the source string. When I hand in an unicode...
38
by: Haines Brown | last post by:
I'm having trouble finding the character entity for the French abbreviation for "number" (capital N followed by a small supercript o, period). My references are not listing it. Where would I...
2
by: Ashabul Yeameen | last post by:
Hi all, I am writing a C program which at some certain steps needs to use the wide character funcion fputwc() for giving utf-8 output. Since I want to make the code more portable, I wrote my own...
3
by: Michael Kellogg | last post by:
In my project's "AssemblyInfo.vb" file, I have set the following for versioning: <Assembly: AssemblyVersion("3.0.*")> Yet every time I rebuild, I get the exact same build number and private...
3
by: sachinvyas | last post by:
Hi, I have following schema saved in new.xsd <?xml version="1.0" encoding="utf-8"?> <xs:schema targetNamespace="http://www.smpte-ra.org/schemas/429.7/2006/CPL"...
3
by: karthi | last post by:
Hi, I want to know how to compile socket programs in c
23
by: Allan Ebdrup | last post by:
I hava an ajax web application where i hvae problems with UTF-8 encoding oc chineese chars. My Ajax webapplication runs in a HTML page that is UTF-8 Encoded. I copy and paste some chineese chars...
1
by: msarora | last post by:
I'm using SimpleTransform.java (renamed as ReceiptTransformer.java for custom use) found in xalan-j_2_7_0 samples directory for transformations in my custom application. The program compiles...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.