swftools-common
[Top][All Lists]
Advanced

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

Re: [Swftools-common] swfstrings and japanese text


From: Con Kolivas
Subject: Re: [Swftools-common] swfstrings and japanese text
Date: Fri, 30 Jun 2006 20:00:12 +1000
User-agent: KMail/1.9.3

On Friday 30 June 2006 19:47, Matthias Kramm wrote:
> On Thu, Jun 29, 2006 at 11:46:08PM +1000, Con Kolivas wrote:
> > Ok I've gone one better and got it working. Obviously the code style and
> > way you choose to implement this is entirely up to you but this patch
> > produces the output I desire.
>
> Thanks!
>
> Am I understanding correctly that
>
>   #include <locale.h>
>   (void)setlocale(LC_ALL,"");
>
> and then
>
>   printf("%lc", code);
>
> causes the printf to write out UTF8 code?

Yes that's correct, but I changed the type of var 'code' to a wchar_t which is 
what %lc is for. That just happens to be an int on many platforms but not all 
so to use it fully would require the cross platform usage of wchar_t. There 
are lots of resources on how to go about this from what I could see when I 
was playing with the code ;)

> Nifty.
>
> I'll probably change it to an own UTF8-output-implementation though, as I'm
> unsure about the cross-platform reliability of <locale.h>.

Sure thing; I said you would probably need to do that when I posted the patch.

> Still, nice patch.

Thanks, hope it helps direct your own efforts.

--
-ck




reply via email to

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