PersonalData->name -> UTF-8 [solved]

Post Reply
Jens
Posts: 21
Joined: Tue Jun 09, 2009 5:13 am
Contact:

PersonalData->name -> UTF-8 [solved]

Post by Jens » Mon Jul 05, 2010 10:07 pm

Boring question coming up. I'm currently using UTF-8 as my unicode support. I want to access PersonalData->name which tells me it's stored as UTF-16. I've searched the Internet wide on how convert it and I'm come up short, which feels a bit strange as I thought it was a really simple problem. I tried using wcstombs(), but that doesn't seem to work for me. Anyone out there who knows this stuff?
Last edited by Jens on Tue Jul 06, 2010 4:14 am, edited 1 time in total.

User avatar
vuurrobin
Posts: 219
Joined: Fri Jul 11, 2008 8:49 pm
Location: The Netherlands
Contact:

Re: PersonalData->name -> UTF-8

Post by vuurrobin » Tue Jul 06, 2010 1:03 am

a quick search gave me this: http://www.deanlee.cn/programming/conve ... e-to-utf8/

see if that works.

Jens
Posts: 21
Joined: Tue Jun 09, 2009 5:13 am
Contact:

Re: PersonalData->name -> UTF-8

Post by Jens » Tue Jul 06, 2010 4:14 am

Well, sir, your Google skills are obviously more refined than mine, because that looks exactly like what I need. Thanks a bunch.

StevenH
Posts: 133
Joined: Sun Feb 22, 2009 7:59 pm

Re: PersonalData->name -> UTF-8 [solved]

Post by StevenH » Tue Jul 06, 2010 11:21 am

Actually the correct code set for the Personal Data is not UTF-16, it's UCS2, which is very close to UTF-16 that the conversion code will work, but there are a couple of minor differences in the coding of the glyphs above 65535 or 0x0000FFFF in the Unicode pages.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 11 guests