Unicode vs UTF8

Unicode vs UTF8

Postby Antonio Linares » Sun Jan 07, 2024 11:11 am

Unicode uses TWO bytes per each character

UTF8 just uses TWO bytes for special characters only! (>127)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Unicode vs UTF8

Postby Enrico Maria Giordano » Sun Jan 07, 2024 4:02 pm

Antonio Linares wrote:Unicode uses TWO bytes per each character

UTF8 just uses TWO bytes for special characters only! (>127)


Using an escape character? If yes, which character?
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Unicode vs UTF8

Postby nageswaragunupudi » Sun Jan 07, 2024 5:31 pm

Utf8 encoding uses either 1 or 2 or 3 bytes for each character.
All latin characters upto asc 127 are represented by the same single character both in Ansi and Utf8 encodings.
Accented WU characters are encoded with 2 bytes.
Complex scripts like Asian languages use 3 bytes for each character.

utf8 also is one form of Unicode encodings.

Windows uses UTF16LE (Little Endian) encoding for all characters, i.e., 2 bytes for each character. This is what we call Wide Char.

Some sample characters:

Image

Now, let us concatenate all UTF8 chars (6th column) and display:
9AÜĞత

Unicode system is a family of different encodings all of which are aimed at uniquely representing ever character of all languages in the world. Also the aim is to display these characters uniquely and exactly the sameway on all systems across the world despite different codepages. There are many such encoding systems out of which, UTF8 is ver popular.

We are mainly concernted with
(1) UTF8 because it is popular and used across the Web and also because many database servers support this encoding and
(2) UTF16LE because Windows OS internally deals with all strings in this format only.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10643
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 68 guests