Hexagora Forum
Hexagora Forum
Home | Profile | Active Topics | Members | Search | FAQ
 All Forums
 Other hexagora products
 Programs (Programmi)
 [HELP] UTF8toString not working

Note: You must be registered in order to post a reply.

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert Email Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
sfi_dev Posted - 20 Jul 2012 : 01:53:39
Hi there,

There seems to be a bug maybe in the conversion of utf8tostring when the non-unicode regional settings of the PC are not English.

I have a sample program where I convert unicode text in your control to UTF8 and then back again to unicode - This does not work when the regional settings of the PC are set to something other than English e.g. Korea (as it would on a korean desktop)

Your help would be very much appreciated - what am I doing wrong ??

Basic sample vb6 program and document showing the issue can be found at www.sfi.com.au/download/temp/unicode_issue.zip

Thank-you

Julie
5   L A T E S T    R E P L I E S    (Newest First)
s.dav Posted - 20 Jul 2012 : 16:02:34
Julie, I sent you a sample
If you want to change Windows locale you need to use relative Windows Apis
sfi_dev Posted - 20 Jul 2012 : 12:46:21
Sorry one more thing, do your controls allow me to change the locale that is to be used programmatically - e.g. always use English etc ? This will solve all my issues ?

Everything works as expected except when non Ansi locales are used.

Thanks for your support. This is my last issue.

Kind Regards Julie
sfi_dev Posted - 20 Jul 2012 : 10:36:33
Thanks for that -
Hex poses a few more problems given the length it returns.

is it a better option if I use strconv to convert and store as ascii then ?


Julie
s.dav Posted - 20 Jul 2012 : 09:51:22
you cannot use a standard textbox (with ANSI encoding) on non ANSI locales (like Korean) for UTF8 strings because UTF8 encoding uses extended ASCII chars so it cannot contain right characters

use a Unicode Textbox also for UTF8 strings in your app

If you need to absolutely use a standard ANSI textbox use our HEX encoding instead of UTF8

sfi_dev Posted - 20 Jul 2012 : 02:21:33
Can I add that I tested UTF8conv.exe going from UTF16->UTF8 and back again and the issue does not occur so it is something that I am doing wrong. Is there source available for utf8conv ?

Hexagora Forum © s.dav Go To Top Of Page
Snitz Forums 2000