discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: String codification


From: Germán Arias
Subject: Re: String codification
Date: Fri, 24 Feb 2012 18:25:05 -0600
User-agent: GNUMail (Version 1.2.0)

On 2012-02-17 00:56:57 -0600 Richard Frith-Macdonald 
<richard@tiptree.demon.co.uk> wrote:

> 
> On 17 Feb 2012, at 01:05, Germán Arias wrote:
> 
>> How can I convert a string to WIndows codification? I want do this for 
>> items at native Windows's menu, since WinUXTheme can't display properly 
>> characters like á, ñ, ...
> 
> Use the [NSString-dataUsingEncoding:] method giving it an argument to specify 
> which encoding you want.
> Modern windows uses 16bit unicode, so unless you are using old APIs (it's 
> probably best to keep to the modern APIs), you can use 
> NSUnicodeStringEncoding
> 
> If you need a jul terminated string, you can use the -cStringUsingEncoding: 
> method rater than -dataUsingEncoding:
> 

Well, I tested today in a Windows 7, but with UTF16 don't works, so I tried 
with 
WindowsCP1252 and works fine. But I don't know if this encoding can be 
problematic 
for other languages. I did this change at line 302 in file WinNSMenu.m. Are 
there 
objection to do this change?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]