LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-28-2012, 08:56 AM   #1
corcodelagaze
LQ Newbie
 
Registered: Feb 2012
Posts: 6

Rep: Reputation: Disabled
xml ed -i spanish characters problem


hello ,
i have a xml file that is written in spanish with their special characters
it looks like this :
<codigo>3F COOL100</codigo>
<codigo_2>-3F COOL100</codigo_2>
<codigo_3>3F-COOL100</codigo_3>
<codigo_4>8480000908698</codigo_4>
<grupo>ACCESORIO DE PORTATIL</grupo>
<familia>Soporte de Port�til con Ventilador</familia>
<marca>3FREE</marca>
<precio>13.95</precio>
<stock>46</stock>
<peso>0.00</peso>
<nombre>BASE CON VENTILACION PARA PORTATILES 12&quot; A 16&quot; + HUB USB 3FREE COOL100</nombre>
<descripcion>CON 3 VENTILADORES 8CM Y HUB 4P USB</descripcion>
<caracteristicas />
<imagen>http://www.desymanonline.com/fotos/art_3F%20COOL100_1.jpg</imagen>
-------------------------------------------------------------------------------------
the problem is here
<familia>Soporte de Port�til con Ventilador</familia>
if i edit the file with xml ed to change some other product from the file i end up
with

<familia>Soporte de Port&#xE1;til con Ventilador</familia>
it messes up the special characters
help
 
Old 02-28-2012, 07:01 PM   #2
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,781

Rep: Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081
Quote:
Originally Posted by corcodelagaze View Post
<familia>Soporte de Port&#xE1;til con Ventilador</familia>
it messes up the special characters
help
If I put that xml in a file an open it in Firefox, the &#xE1 looks like "á" (a with tick above it). According to XML to those are just 2 ways of writing the same thing. Passing the file through xml c14n also converts it to "á".

PS In your post the "á" looks like "ï" (i with 2 dots), "¿" (upside down question mark), and "½" (fraction 1/2). So &#xE1 is really a safer way of storing "á".
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with spanish characters while using Google API, PHP, MySql sureshv120 Linux - Server 1 02-08-2012 04:26 PM
How can I type characters that aren't in my Spanish keyboard? DeeDeeRamone Linux - General 2 10-16-2008 06:43 PM
Spanish accented characters in an English keyboard (Xubuntu)? joseantmm Ubuntu 2 01-23-2007 09:04 AM
Fedora Spanish Characters - a new twist: mySQL jjdoll42 Linux - Software 1 05-19-2005 02:28 PM
Print Spanish Characters in Epson FX-850 blas Linux - General 0 01-29-2004 12:56 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration