473,788 Members | 2,721 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Editing XML with special characters like ç, á, or ñ

Editing XML with special characters like ç á ñ

Hello. I have to code a multilanguage website. As it will be very
static, I set things up so everything is loaded from an XML file.
However, as soon as I tried to start typing in the text in spanish,
french and polish, I realized that no XML editor I knew would let me
type and output unicode references. I mean, I need something where I
can press the ´e sequence in the keyboard and get é (without the
space) instead of the normal output é. If I am to type in a virtual
keyboard or insert the characters from a character map this will turn
into an endless task. How do russian, polish or chinese people write
their (raw) XML?
Thanks!!!

Apr 4 '06 #1
8 5787
sa******@partir viajes.com.ar wrote:
How do russian, polish or chinese people write
their (raw) XML?


Sometimes by specifying an encoding that matches the keyboard they're
using (the XML declaration says which encoding a given file is written
in). Sometimes by converting it from their native encoding to UTF8
before publishing.
--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
Apr 5 '06 #2
Joe Kesselman wrote:
sa******@partir viajes.com.ar wrote:
How do russian, polish or chinese people write
their (raw) XML?


Sometimes by specifying an encoding that matches the keyboard they're
using (the XML declaration says which encoding a given file is written
in). Sometimes by converting it from their native encoding to UTF8
before publishing.


Yes, that's the way we type our Umlauts and
other strange characters in German. At the shell
level, I can find out which encoding is used by
my operating system:

locale
LANG=de_DE.UTF-8
LC_CTYPE="de_DE .UTF-8"
LC_NUMERIC="de_ DE.UTF-8"
LC_TIME="de_DE. UTF-8"
LC_COLLATE="de_ DE.UTF-8"
LC_MONETARY="de _DE.UTF-8"
LC_MESSAGES="de _DE.UTF-8"
LC_PAPER="de_DE .UTF-8"
LC_NAME="de_DE. UTF-8"
LC_ADDRESS="de_ DE.UTF-8"
LC_TELEPHONE="d e_DE.UTF-8"
LC_MEASUREMENT= "de_DE.UTF-8"
LC_IDENTIFICATI ON="de_DE.UTF-8"
LC_ALL=

The "locale" command is a standard POSIX command.
Read the newgroup gnu.utils.bug. You will find that
problems with locale cause many "bug reports" there
which are not bugs, but locale-specific details.

And now some weird characters to disturb your emailer:
äÄöÖüÜ and the best is ß
Apr 5 '06 #3
sa******@partir viajes.com.ar wrote:
Editing XML with special characters like ç á ñ

Hello. I have to code a multilanguage website.
First, get rid of the concept that ç, á, or ñ are in any way "special".
They are normal standard characters in many languages. If you hope to
code a multilingual site you must treat all characters as standard.
As it will be very
static, I set things up so everything is loaded from an XML file.
However, as soon as I tried to start typing in the text in spanish,
french and polish, I realized that no XML editor I knew would let me
type and output unicode references.
What XML editor were you using? All the ones I know have no problem
at all in handling ISO-8859-1 or -2.
I mean, I need something where I
can press the ´e sequence in the keyboard and get é (without the
space) instead of the normal output é.


AFAIK they all do this. If they don't, they are basically useless as
XML editors.

///Peter
--
XML FAQ: http://xml.silmaril.ie/
Apr 9 '06 #4
Thanks for the answers.
Well, none of the editors I've tried so far converts to unicode right
away. For instance, the XMLSpy 2006 trial inserts accented characters
in the xml instead of the numeric unicode entity. The same goes for
Notepad++ and several others.

Regarding Joe Kesselman and Jürgen Kahrs' messages, I don't think I've
quite understood what they ment. I don't see how the keyboard layout
has anything to do with how xml editing software render the "é"s.

Apr 11 '06 #5
sa******@partir viajes.com.ar wrote:
Regarding Joe Kesselman and Jürgen Kahrs' messages, I don't think I've
quite understood what they ment. I don't see how the keyboard layout
has anything to do with how xml editing software render the "é"s.


The keyboard layout is a hint. If someone has a
German keyboard, it is very likely that he uses
a suitable locale at the operating system level.

If none of the editors you tried works correctly,
then you should consider that some settings in
your environment (probably locale settings) are
not correct. Rest assured that even my vi editor
knows German Umlauts and Japanese characters too.
Apr 11 '06 #6
Jürgen Kahrs wrote:
The keyboard layout is a hint. If someone has a
German keyboard, it is very likely that he uses
a suitable locale at the operating system level.


.... And therefore is working directly in an encoding which supports
those characters.

You need the system, or the editor, or both switched into the
appropriate encoding (which may require loading additional
operating-system files not present in the usual American version, eg
fonts which include the necessary characters). Or you need the system
set up to work in and display full Unicode (which will still need
suitable fonts). Or you need to get used to working in terms of the escapes.

--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
Apr 11 '06 #7
Please see how people do it for Web pages in HTML -
see "Multilingu al HTML" section here: http://RusWin.net
--
Paul

Apr 16 '06 #8

Peter Flynn wrote:

What XML editor were you using? All the ones I know have no problem
at all in handling ISO-8859-1 or -2.


He mentioned Russian and Russian (Cyrillic) is not covered by these
two.
It is a separate code page - iso-8859-5 on UNix (or KOI8-R) and
windows-1251 under Windows.

--
Regards,
Paul
http://RusWin.net

Apr 16 '06 #9

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

Similar topics

7
9005
by: Roy W. Andersen | last post by:
I've been searching google about this for days but can't find anything, so I'm hoping someone here can help me out. I'm trying to create zip-files without needing the zip-file extension in PHP, mainly because I need the ability to both create and extract zip-files. I've tried a couple of classes found here and there, and they all seem to have the same problem. I'm currently using PclZip (http://phpconcept.net/pclzip/) but even the...
3
17210
by: Barry Olly | last post by:
Hi, I'm working on a mini content management system and need help with dealing with special characters. The input are taken from html form which are then stored into a varchar column in oracle database. When i retrieve the data, some of the special characters have been changed to ??? and also
3
2436
by: Dirk Rudolf | last post by:
I like to announce you the product X2U, avaible under http://www.lumrix.net/x2. X2U is an acronym for "XML to user". Existing XML editors still ignore the fact that users don't want to read XML markup. Our view is: Not users have to align to XML, but XML has to align to users. X2U allows users tp fill out simple web forms, which are automatically derived from XML models. The XML model provides the XML structure and an interface...
1
1996
by: AndrewDucker | last post by:
I've just started working with some people that have an odd setup and I'm wondering if someone can point out a better way of doing things (or what I'm doing wrong). They have a base form class, derived from the standard Form, but with the ability to show a list of panels in order. Each of these panels is a subclass of a subclass of Panel. The initial subclass is tweaked to work with the special form and then each subclass of that is...
5
8631
by: Sakharam Phapale | last post by:
Hi All, I am using an API function, which takes file path as an input. When file path contains special characters (@,#,$,%,&,^, etc), API function gives an error as "Unable to open input file". Same file path containing special characters works fine in one machine, but doesn't work in other. I am using following API function to get short file path. Declare Auto Function GetShortPathName Lib "kernel32" (ByVal lpszLongPath As
8
3713
by: david.lindsay.green | last post by:
Hello all, I am quite new a web scripting and making web pages in general and I have stumbled across a problem I have as yet been unable to solve. I am trying to take the contents of a textarea box and save it to a file. This step is not to hard however the contents of the textarea is mostly latex source so it contains just about every special character you can imagine. My question is this, how do I save an exact copy of the textarea...
1
4575
by: sonald | last post by:
Dear All, I am working on a module that validates the provided CSV data in a text format, which must be in a predefined format. We check for the : 1. Number of fields provided in the text file, 2. Text checks for max. length of the field & whether the field is mandatory or optional Example:
3
10202
KevinADC
by: KevinADC | last post by:
Purpose The purpose of this article is to discuss the difference between characters inside a character class and outside a character class and some special characters inside a character class. This is not a regular expression tutorial. Assumes you are already familiar with basic regular expression concepts and terminology. If not, you may want to read some regular expression tutorial. See the end of the article for links to online resources....
0
2000
by: AAaron123 | last post by:
Been playing with asp:changepassword and have it looking OK except that I can't elininate or change the title at the top that says "Change Your Password". It's a repeat of my pages title. But more importantly, I can't find the regular expression for at least 7 characters and at least 1 special character. Can you help?
0
9656
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
9498
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
10177
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
10113
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
9969
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
8995
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
5402
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...
1
4074
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
3677
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.