PC Review


Reply
Thread Tools Rate Thread

How to compile a UTF-8 resource file

 
 
Zheng Huang
Guest
Posts: n/a
 
      24th Jul 2003
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

 
Reply With Quote
 
 
 
 
Mihai N.
Guest
Posts: n/a
 
      26th Jul 2003
> 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
 
Reply With Quote
 
Zheng Huang
Guest
Posts: n/a
 
      28th Jul 2003
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
>.
>

 
Reply With Quote
 
Mihai N.
Guest
Posts: n/a
 
      29th Jul 2003

ä 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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
access text file linked at compile time as resource TD is PSP Microsoft C# .NET 0 17th Sep 2008 08:51 AM
How to compile resource files via Nant? Brett Romero Microsoft C# .NET 2 31st May 2006 11:14 PM
Create resource file and compile it as DLL Maileen Microsoft VB .NET 1 7th Aug 2005 01:26 PM
Resource file compile time dependencies Jan Bares Microsoft VC .NET 4 18th May 2004 08:06 AM
is possible to edit/replace an embbebed resource file after compile a file? andre Microsoft Dot NET Framework Forms 3 11th Nov 2003 03:46 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:59 PM.