Joachim Pfaff wrote:
> Most Umlaut-Problems i got in contact with are the result of wrong
> encoding of the XML-File. If you created the XML-File within your own
>
> application, get sure that you are using the correct encoding, when
> wrinting the file.
>
> In my xsl-fo-documents many different umlauts(sic!) of different
> languages making no problems.
>
> Greetings,
>
> Joachim
>
>> On Mon, 20 Mar 2006 13:43:08 +0200 "Andre Groeneveld"
>> <[EMAIL PROTECTED]> wrote:
>>
>>> A little off the subject though, but can you please help me with a new
>>> problem? I can't load umlauts into my xsl from an xml sheet,
>
>
as said, use the right encoding.
my xml-files start with the following:
<?xml version="1.0" encoding="ISO-8859-1"?>
with this i can use umlauts like ä, ö, ü, ß and such...
you also have to take care of a few special-chars like "<" or ">", as they
have a special meaning in xml. i use a small perl-function to "correct" them
my %XML_Encode = (
'&' => 'amp',
'<' => 'lt',
'>' => 'gt',
'"' => 'quot',
"'" => 'apos');
my $XML_Encode_Pattern = join ("|", keys %XML_Encode);
sub xmlSaveEncode {
my ($s) = @_;
$s =~ s/($XML_Encode_Pattern)/&$XML_Encode{$1};/go;
return $s;
}
now you can use
$string = &xmlSaveEncode('Müller & Co');
markus
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]