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

Home Posts Topics Members FAQ

Dealing with character sets

I have a text area that people should type in (duh) which will later be
displayed for other users via HTML. I've taken care of the HTML aspect
in a pretty cool way, but I worry about character sets now.

Everything works for me, but I use UTF-8. When the form is submitted,
how do I know what character set the data is coming in? I need to know
this to perform htmlentities on the data and have it work properly.

All my pages are defined as UTF-8. Would this mean that the data coming
from the form also be UTF-8?
<meta http-equiv="content-type" content="text/html;charset=ut f-8">

Finally, when I need to put the content back into the textarea for
editing, do I need to use the original character set with
html_entity_dec ode, or can I have it output in a new character set?

I've dealt with character sets in REALbasic before, and have a good
grasp of what they are and such. But I have no experience with
third-party browsers and all that jazz.

Basically, what do I do?

--
- Thom McGrath
Head of the ZeeTox Project and lead programmer for The ZAZ
Contact me with iChat or AOL Instant Messenger: zazTekcor

Jul 17 '05 #1
3 2024
Thom McGrath wrote:
I've dealt with character sets in REALbasic before, and have a good
grasp of what they are and such. But I have no experience with
third-party browsers and all that jazz.


That's a huge and complicated arena, even for someone like yourself
who's covered the groundwork. Have fun!

http://ppewww.ph.gla.ac.uk/~flavell/...form-i18n.html

--
Jock
Jul 17 '05 #2
On 2004-02-24 05:36:49 -0500, John Dunlop <jo*********@jo hndunlop.info> said:
Thom McGrath wrote:
I've dealt with character sets in REALbasic before, and have a good
grasp of what they are and such. But I have no experience with
third-party browsers and all that jazz.


That's a huge and complicated arena, even for someone like yourself
who's covered the groundwork. Have fun!

http://ppewww.ph.gla.ac.uk/~flavell/...form-i18n.html

Don't I know it! I love the web, but sometimes I hate it so much.

--
- Thom McGrath
Head of the ZeeTox Project and lead programmer for The ZAZ
Contact me with iChat or AOL Instant Messenger: zazTekcor

Jul 17 '05 #3

Uzytkownik "Thom McGrath" <th**@thezaz.co m> napisal w wiadomosci
news:2004022321 401116807%thom@ thezazcom...
Everything works for me, but I use UTF-8. When the form is submitted,
how do I know what character set the data is coming in? I need to know
this to perform htmlentities on the data and have it work properly.

All my pages are defined as UTF-8. Would this mean that the data coming
from the form also be UTF-8?
<meta http-equiv="content-type" content="text/html;charset=ut f-8">


Yes. The data coming in will have the same encoding as the page that does
the post.
Jul 17 '05 #4

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

Similar topics

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.
19
3403
by: Ian | last post by:
I'm using the following meta tag with my documents: <meta http-equiv="Content-Type" content= "text/html; charset=us-ascii" /> and yet using character entities like &rsquo; and &mdash; It validates at W3C and WDG, and runs in standards compliance mode in Firefox 0.9. What I'm wondering is, is this a good practice? I assume my pages will load faster if declared as using the
4
1405
by: siliconmike | last post by:
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
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...
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?
16
2802
by: lovecreatesbeauty | last post by:
/* When should we worry about the unwanted chars in input stream? Can we predicate this kind of behavior and prevent it before debugging and testing? What's the guideline for dealing with it? As shown below line #21, I should remove the unwanted characters in input stream there at that time. Do I miss some other possible errors in i/o which will happen to occur sometimes in other places? And welcome your kind comments on following the...
6
1857
by: John Henry | last post by:
Hi list, If I have a bunch of sets: a = set((1, 2, 3)) b = set((2, 3)) c = set((1, 3)) ..... What's the cleanest way to say:
9
2928
by: jraul | last post by:
1) Am I correct that C++ does not have a defined character set? In particular, a platform might not use the ASCII character set? 2) C++ supports wchar_t types. But again, this has no defined character set? For instance, it might not be a unicode character set?
3
2280
by: sophie_newbie | last post by:
Hi, I want to store python text strings that characters like "é" "Č" in a mysql varchar text field. Now my problem is that mysql does not seem to accept these characters. I'm wondering if there is any way I can somehow "encode" these characters to appear as normal characters and then "decode" them when I want to get them out of the database again? -Thanks.
0
9680
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
10456
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...
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
9052
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
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
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
3
2926
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.