You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "Matthias B." <ms...@winterdrache.de> on 2006/03/20 19:40:56 UTC

Re: Umlaut problems[was: Re: Keep-together.]

On Mon, 20 Mar 2006 13:43:08 +0200 "Andre Groeneveld"
<an...@isservices.co.za> 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, 

Could you be more specific. What exactly is your problem? 

MSB


-- 
I will continue to be an impossible person
as long as those who are now possible remain possible.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Umlaut problems[was: Re: Keep-together.]

Posted by Markus Rietzler <we...@mrietzler.de>.
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"
>> <an...@isservices.co.za> 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: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Umlaut problems[was: Re: Keep-together.]

Posted by Joachim Pfaff <ne...@compuserve.de>.
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"
> <an...@isservices.co.za> 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, 



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org