XML and save to iso-8859-1

Questions about XML that are not covered by the other forums should go here.
juglarx
Posts: 3
Joined: Mon Apr 17, 2006 6:09 pm

XML and save to iso-8859-1

Post by juglarx »

Hi!!!! i have a txt file in iso-8859-1 format , when i copy and paste this content to my xml i had the Oxygen Msbox error about saving to UTF... but i need to save the file in the iso-8859-1 any one can help me with that ... ?? i don't want XSL transofrmation , just Copy --> paste --> save...

thanks in advance...
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

The encoding for an XML file can be specified with the encoding pseudoattibute in the XML header, like below for instance:

Code: Select all


<?xml version="1.0" encoding="ISO-8859-1"?>
For non XML files oXygen provides a option that allows to specify the encoding for non XML file. See the Options->Preferences Global preferences page.

Best Regards,
George
juglarx
Posts: 3
Joined: Mon Apr 17, 2006 6:09 pm

Post by juglarx »

thaks for que reply , i know pseudoattibute in the XML header , but when a write some text in "catalan" (slang of spanih) and i try to save , oxygen tell me that xml can not be saved becouse it have ilegal characters...:(
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi,

Yes, that is correct, if a character cannot be represented in a specified encoding oXygen suggests you to use an encoding that covers those characters like UTF-8 for instance. Now you can also replace those characters with entities, you can use for instance the Source->Escape selection contextual menu action (right click on Windows, CTRL+Click on Mac to get the contextual menu) and escape only the characters above 255 (disable all the standard entities escaping <, &, >, " and ' and enable the Escape Unicode Characters starting with option and leave the value to 255).

Best Regards,
George
juglarx
Posts: 3
Joined: Mon Apr 17, 2006 6:09 pm

Post by juglarx »

txs!
Post Reply