473,663 Members | 2,705 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Regarding UTF16

Hi ,

I wanted information about UTF16 format and what is disadvantage over UTF8
format..

TIA

Mohan
Feb 2 '06 #1
5 1634
news.fe.interne t.bosch.com wrote:
Hi ,

I wanted information about UTF16 format and what is disadvantage over UTF8
format..

This group (c.l.c) is the wrong place to ask.

I believe comp.software.i nternational is (followup-to added).

Cheers

Vladimir

Feb 2 '06 #2
Try:

http://www.unicode.org/

Hope this help.

Feb 2 '06 #3
in comp.lang.c i read:
I wanted information about UTF16 format and what is disadvantage over UTF8
format..


in c the most notable difference would be that utf-16 would usually be
composed of two bytes -- in c bytes need not be 8 bits, but it is very
common -- so then fully half the code space has a byte whose value is 0. a
sequence of such codes cannot be treated as a string. a utf-8 sequence can
be treated as a normal string, and these days it is a common form for an
implementation' s mbcs.

in c we also have wide characters and wide character strings. there is no
requirement that the encoding be utf-16 -- some implementations use it,
some do not; these days i would expect utf-32 (or ucs-4 -- yuck!) the more
common. with a wide character string the embedded null byte pitfall is
avoided but there is other effort required to make them work well.

--
a signature
Feb 5 '06 #4
On 2006-02-05, those who know me have no need of my name <no************ ****@usa.net> wrote:
in comp.lang.c i read:
I wanted information about UTF16 format and what is disadvantage over UTF8
format..


in c the most notable difference would be that utf-16 would usually be
composed of two bytes -- in c bytes need not be 8 bits, but it is very
common -- so then fully half the code space has a byte whose value is 0. a


Actually it's roughly one in 128. Of the set of 16-bit values:

There are a total of 65536 values. There are 510 that have exactly one 0
byte, exactly 1 that has two 0 bytes, and 255*255=65025 that do not
contain a 0 byte.

However, the area with a first byte of 0 and a second byte between 32
and 126 are considered "the most important" for traditional reasons, and
this encompasses the entire basic execution character set.
Feb 5 '06 #5
in comp.lang.c i read:
On 2006-02-05, those who know me have no need of my name
<no*********** *****@usa.net> wrote:
in c [...] utf-16 would usually be composed of two bytes [...] so then
fully half the code space has a byte whose value is 0.


Actually it's roughly one in 128. Of the set of 16-bit values:

There are a total of 65536 values. There are 510 that have exactly one 0
byte, exactly 1 that has two 0 bytes, and 255*255=65025 that do not
contain a 0 byte.


err, oops -- thanks for the catch!
However, the area with a first byte of 0 and a second byte between 32
and 126 are considered "the most important" for traditional reasons, and
this encompasses the entire basic execution character set.


just where my mind was at, unfortunately.

--
a signature
Feb 12 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1806
by: Francis Lavoie | last post by:
Hello I have some questions regarding webframework, I must say that I quite lost and these questions are basicly to help me understand the way it work. I have some knowledge with PHP and JSP. I have looked for a python web framework to build a web site, a site that I had start in php (and quite finish), but for some reason I wont explain, I lost everything. I have started writting app with python 6
2
4021
by: Xah Lee | last post by:
i have a bunch of files encoded in GB18030. Is there a way to convert them to utf16 with python? Xah xah@xahlee.org http://xahlee.org/PageTwo_dir/more.html
3
1769
by: praba kar | last post by:
Dear All, I am new to Python. I am in need of some sorting functions (eg) numerical sorting functions and alphapetical sorting functions. I have searched through net But I cannot find any regarding this so If anyone know regarding this. Kindly mail me as early as possible with regards
1
2982
by: John Perks and Sarah Mount | last post by:
(My Python uses UTF16 natively; can someone with UTF32 Python let me know if that behaves differently?) >>> import codecs >>> u'\ud800' # part of surrogate pair u'\ud800' codecs.utf_16_be_encode(_) '\xd8\x00' codecs.utf_16_be_decode(_) Traceback (most recent call last):
12
4087
by: Chris Mullins | last post by:
I'm implementing RFC 3491 in .NET, and running into a strange issue. Step 1 of RFC 3491 is performing a set of mappings dicated by tables B.1 and B.2. I'm having trouble with the following mappings though, and it seems like a shortcoming of the .NET framework: When I see Unicode value 0x10400, I'm supposed to map it to value 0x10428. This list goes on (the left colulmn is the existing value, the right column
8
5241
by: Mike | last post by:
Hello, I have a few rather urgent questions that I hope someone can help with (I need to figure this out prior to a meeting tomorrow.) First, a bit of background: The company I work for is developing a web-based application, one part of which involves allowing the user the ability to page through transaction "history" information. The _summary_ history table will have the following fields: ServiceName, Date, User-Ref1, User-Ref2,...
4
3127
by: Fuzzyman | last post by:
Hello all, I'm handling some text files where I don't (necessarily) know the encoding beforehand. Because I use regular expressions to parse the text I *must* decode UTF16 encoded text (otherwise the regexes split on byte boundaries). I can recognise UTF8 and BOM and remove (but not necessarily decode). For UTF16 it seems that the Python codec will automatically remove the BOM. Having detected it (to trigger a decode) is it considered
4
3924
by: R Wood | last post by:
Greetings - A recent Perl experiment hasn't turned out so well, which has piqued my interest in Python. The project is this: take a Vcard file exported from Apple's Addressbook and use a language that is good at parsing text to convert it into a mutt alias file. There are better ways to use Mutt with Mac's addressbook, but I want to be able to periodically convert my working addressbook file into an alias file I can then transfer...
1
5351
by: Server Applications | last post by:
Hello I am trying to build a system where I can full-text index documents with UTF8 or UTF16 data using Oracle Text. I am doing the filtering in a third-party component outside the database, so the I dont need filtering in Oracle, but only indexing. If I put file references to the filtered files in the database and index these (using FILE_DATASTORE), everything works fine. But I rather put the filtered data in the database, and index it...
0
8435
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8345
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8857
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8768
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8547
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
4181
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4348
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2763
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1999
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.