473,397 Members | 2,084 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Missing unicode data?

Hi group,

I just came across the following exception:

#v+

$ python
Python 2.4.2 (#2, Sep 30 2005, 21:19:01)
[GCC 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import unicodedata
u'\N{LATIN LETTER SMALL CAPITAL BARRED B}' UnicodeDecodeError: 'unicodeescape' codec can't decode bytes in position 0-38: unknown Unicode character name unicodedata.name(u'\u1d03') Traceback (most recent call last):
File "<stdin>", line 1, in ?
ValueError: no such name ^D

$

#v-

When checking unicodedata.name() against each uchar in the file
/usr/share/unidata/UnicodeData-4.0.1d1b.txt that came with the
console-data package on my Ubuntu Linux installation a total of
1226 unicode characters seems to be missing from the unicodedata
module (2477 missing characters when checking against the latest
database from unicode.org¹). Is this a deliberate omission?

Cheers,
Klaus.

¹) http://www.unicode.org/Public/UNIDATA/UnicodeData.txt
--
Klaus Alexander Seistrup
SubZeroNet, Copenhagen, Denmark
http://magnetic-ink.dk/
Jun 3 '06 #1
2 2267
Klaus Alexander Seistrup wrote:
When checking unicodedata.name() against each uchar in the file
/usr/share/unidata/UnicodeData-4.0.1d1b.txt that came with the
console-data package on my Ubuntu Linux installation a total of
1226 unicode characters seems to be missing from the unicodedata
module (2477 missing characters when checking against the latest
database from unicode.org¹). Is this a deliberate omission?


I'm pretty sure unicodename.name() doesn't look in the UnicodeData file
on your machine, nor in the latest file from unicode.org. in other
words, you get whatever version that was used to create the Unicode data
set in your Python distribution.

this is usually the version that was current when that Python version
was originally released (i.e. in your case, when 2.4 was released).

iirc, 2.4 uses Unicode 3.2, and 2.5 uses Unicode 4.1. to update, use
the tools under Tools/unicode.

</F>

Jun 3 '06 #2
Fredrik Lundh skrev:
I'm pretty sure unicodename.name() doesn't look in the Unicode-
Data file on your machine, nor in the latest file from unicode.org.
I am pretty sure of that, too. I was only using those files as a
reference against the unicode data that comes with my python interpreter.
in other words, you get whatever version that was used to create
the Unicode data set in your Python distribution.
I see.
iirc, 2.4 uses Unicode 3.2, and 2.5 uses Unicode 4.1. to update,
use the tools under Tools/unicode.


Thanks for the hint.

Mvh,

--
Klaus Alexander Seistrup
SubZeroNet, Copenhagen, Denmark
http://magnetic-ink.dk/
Jun 3 '06 #3

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

Similar topics

8
by: Bill Eldridge | last post by:
I'm trying to grab a document off the Web and toss it into a MySQL database, but I keep running into the various encoding problems with Unicode (that aren't a problem for me with GB2312, BIG 5,...
2
by: Harish Mohanbabu | last post by:
Hi, I have got couple of questions about unicode settings for database and I would be thankful if someone can clear the same for me. Here I go - a. How can I find out whether unicode has been...
4
by: webdev | last post by:
lo all, some of the questions i'll ask below have most certainly been discussed already, i just hope someone's kind enough to answer them again to help me out.. so i started a python 2.3...
1
by: anantvrana | last post by:
Hello All, I am trying to read Unicode (Kanji character) data from a text file. When I store unicode data into variable my Kanji character gets messed up. I am using following code Open...
6
by: John Sidney-Woollett | last post by:
Hi I need to store accented characters in a postgres (7.4) database, and access the data (mostly) using the postgres JDBC driver (from a web app). Does anyone know if: 1) Is there a...
0
by: Klaus Alexander Seistrup | last post by:
Hi group, I just came across the following exception: #v+ $ python Python 2.4.2 (#2, Sep 30 2005, 21:19:01) on linux2 Type "help", "copyright", "credits" or "license" for more...
1
by: jrs_14618 | last post by:
Hello All, This post is essentially a reply a previous post/thread here on this mailing.database.myodbc group titled: MySQL 4.0, FULL-TEXT Indexing and Search Arabic Data, Unicode I was...
3
by: gudiya | last post by:
hi, My code works but i am missing the first 2 characters of file name. Any idea why???? using System; using System.Collections.Generic; using System.ComponentModel; using System.Data;...
1
by: Mudcat | last post by:
In short what I'm trying to do is read a document using an xml parser and then upload that data back into a database. I've got the code more or less completed using xml.etree.ElementTree for the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.