Article View: borland.public.cppbuilder.internationalization
Article #311Re: UTF8Decode Problem
From: g
Date: Tue, 24 Aug 2004 09:20
Date: Tue, 24 Aug 2004 09:20
44 lines
2626 bytes
2626 bytes
I do want to try the component of ElPack, but the package from the link you specified seems not available cause it said "Document Not Found". Is there any other component that is similar to ElPack? Best regards, Grace "Andrue Cope [TeamB]" <no.spam@spammy.com> wrote: >g wrote: > >> The problem that I experienced is that when use TStrings to read a >> line and display on the ListBox1, some of the characters are encoded >> correctly, but some characters display in question mark (?) > >The VCL does not use Unicode strings. That means that when it displays >characters they have to all belong to the same codepage. To put it >another way - there is only ever 256 characters that VCL components can >display. Which 256 characters depends on the font being used and the >codepage settings. > >When you convert a WideString into an AnsiString the conversion will >attempt to find a character in the current codepage for every character >in the WideString. If you are getting characters that can come from any >language then there is scope for at least some of them to be >unrepresentable in the current codepage and you get a '?' in their >place. > >To use a specific example:If I try to display a string with Cyrillic >(Russian) characters using the VCL I will get '?'s. This is because I >live in the UK and my machine is configured for Western European >characters. > >The only solution to your particular problem is to display the >WideStrings themselves. We use the following library: > > http://www.shareup.com/ElPack-download-989.html > >In practice you'll probably only have to convert a few components to >Unicode. Most of them can survive as 8-bit simply by translating the >original strings. > >-- >Andrue Cope [TeamB] >[Bicester, Uk] >http://info.borland.com/newsgroups/guide.html
Technical Details
Message-ID:
<412b084e$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<412ac101$1@newsgroups.borland.com> <412af5c2@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10297d,f2c293d7982a2280 X-Google-Attributes: gid10297d,public X-Google-Language: ENGLISH,ASCII-7-bit From: "g" <gmyc@hotmail.com> Sender: "g" <gmyc@hotmail.com> Reply-To: "g" <gmyc@hotmail.com> Subject: Re: UTF8Decode Problem Newsgroups: borland.public.cppbuilder.internationalization X-User-Info: 203.80.236.62 References: <412ac101$1@newsgroups.borland.com> <412af5c2@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <412b084e$1@newsgroups.borland.com> Date: 24 Aug 2004 02:20:14 -0700 X-Trace: newsgroups.borland.com 1093339214 207.105.83.66 (24 Aug 2004 02:20:14 -0700) Lines: 45 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail