473,796 Members | 2,509 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What are character sets?

All I know is that there are 8 bit numbers from 0 to 255 mapped to
characters like A, B, C, D and some strange looking ones (like the ones
used to make boxes in old PC text modes) all these being called ASCII
characters.

So, what in a nutshell does "character sets" mean and how are they
helpful in displaying multiple languages ?
Any simple explanation?

Mike

Jul 23 '05 #1
4 1405
siliconmike wrote:
All I know is that there are 8 bit numbers from 0 to 255 mapped to
characters like A, B, C, D and some strange looking ones (like the ones
used to make boxes in old PC text modes) all these being called ASCII
characters.

So, what in a nutshell does "character sets" mean and how are they
helpful in displaying multiple languages ?
Any simple explanation?

Mike

Someone else here might correct me but I'm pretty sure I know... and
you're near enough correct.

A standard character set (at least where the western world is concerned)
uses values 1 to 127 for the characters on your keyboard. An example is
A is 65, B is 66, C is 67 and so on... a (lowercase A) is 97... b is 98
and so on... All the numbers, alphabetic characters (upper/lower case)
and the characters above your numbers (on a QWERTY keyboard) are, among
a few others, included in this character set.

In order to allow for 'foreign' character sets, there is room for
additional characters from 128 to 255. (By foreign I don't mean to
offend anyone but I cannot think of any other word forit - sorry). This
128-255 in the character set I believe is used for characters that
don't follow what I've mentioned. For example, some of the Nordic
countries in Europe I believe have a letter that looks like a numeric
zero (I think they have an O with a slash that goes through it).
France, Spain and Germany are a few too which have dashes, apostraphes
or carats (^) above some of their characters. In order to allow for
this, they would have a value stored somewhere from 128 to 255 in the
appropriate character set. If you include the extra dashes, apostraphes
or whatever above some alphabets in foreign countries as being seperate
characters then you could *almost* say that some of these countries have
more than 26 letters in their alphabet...

Does this help / answer your question?

randelld
Jul 23 '05 #2
yes, then how to make sure that a field of a column called
"descriptio n" could contain text in any global language ?

Should I have an extra column called "char-set"
and another extra column called "language" ?
to complement the "descriptio n" column ?

Any other mechanisms?

Jul 23 '05 #3
siliconmike wrote:
yes, then how to make sure that a field of a column called
"descriptio n" could contain text in any global language ?


Read about Unicode. MySQL 4.1 supports this character set. I'm no
expert, but it appear that Unicode allows you to store different
language encodings in one column.

Overview of Unicode:
http://en.wikipedia.org/wiki/Unicode

Unicode support in MySQL 4.1:
http://dev.mysql.com/doc/mysql/en/charset-unicode.html
(read the example provided in the user comments)

Regards,
Bill K.
Jul 23 '05 #4
Unicode solves it. Thank you.

Mike

Jul 23 '05 #5

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

Similar topics

7
2929
by: WindAndWaves | last post by:
Hi Folk Here I am writing my first php / mysql site, almost ready, and now this... charactersets.... The encoding that I use on my webpage is: <META HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8"> When people enter new data I use
0
1812
by: Thiko | last post by:
Hi According to the official mysql manual: http://www.mysql.com/doc/en/Charset-SHOW-CHARSET.html The syntax to show all available character sets is the SHOW CHARACTER SET command. It takes an optional LIKE clause that indicates which character set names to match.
5
8504
by: PEK | last post by:
I need some code that convert a multi-byte string to a Unicode string, and Unicode to multi-byte. I work mostly in Windows and know how to solve it there, but I would like to have some platform independent code too. I have tried with mbtowcs/wctombs but I'm not satisfied with the result. If wctombs finds a character that can't be converted it return -1, and stops. I would like to replace such of characters with some special character...
1
5032
by: Vishal | last post by:
Hello! My client has a need to be able to store Japanese characters in their PeopleSoft database. So we need to change the character set from from Latin1_General (1252) to Japanese character set (932) on SQL Server 2000 Enterprise. I have 2 questions: 1) I would like to know if in SQL Server, the character set is machine specific or is it defined at the database instance level? 2) Can multiple installs of SQL Server co-exist on a single...
37
10174
by: chandy | last post by:
Hi, I have an Html document that declares that it uses the utf-8 character set. As this document is editable via a web interface I need to make sure than high-ascii characters that may be accidentally entered are properly represented when the document is served. My programming language allows me to get the ascii value for any individual character so what I am doing when a change is saved is to look at each character in the content and...
64
4640
by: ng5000 | last post by:
Hi, What's the point of a signed char? As I see it a char represents a character (not an integer, use an int type e.g. short int if you want an 8 bit number, or one of the new types, uint8 I think). I don't know of any character sets that use negatives, e.g. 65 is 'A' and -65 is 'a'?!? I'm sure I'm missing something, any ideas?
21
2014
by: aegis | last post by:
7.4#1 states The header <ctype.h> declares several functions useful for classifying and mapping characters.166) In all cases the argument is an int, the value of which shall be representable as an unsigned char or shall equal the value of the macro EOF. If the argument has any other value, the behavior is undefined. Why should something such as: tolower(-10); invoke undefined behavior?
12
1985
by: semut | last post by:
Given that the string is of null terminated type. What could be the possible causes (by experience) the string to have no null terminated and cause buffer overflow later. I know it is quite broad, just like to find out the causes as much as possible so that I could impose stricter checking toward my codes. note: I could not use std::string cause it will require a total rewrite. thanks.
0
1354
by: peridian | last post by:
Hi, Can I do a bulk "find and replace" on data in SQL Server to convert character set data? I have data coming in from multiple external sources. That data is not always in UTF-8 or ASCII character sets, but that's okay internal to the database, as it has to remain in the source's local format. Every month I run a query to select data out of the database, put it into a temporary export table, then dump it out to a plain text file. ...
0
9528
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
10230
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
10174
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
10012
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6788
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5442
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
5575
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4118
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
3731
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.