[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: strange (swedish) characters



Quoting Markus Jardemalm <markus.jardemalm@redina.se>:

> Thanks Paul,
> your scriptlet did the work for me ;-). Since I anyway use a perlscript 
> to read the source and insert into the directory this was the absolute 
> best solution.
> 
> However, I use my directory with e-mail clients for lookups. But the 
> swedish character is not visible from Netscape e-mail client. I can 
> imagine that this has to do with the different character encodings 
> (Netscape probably use another encoding).
> 
> Is there a way to display my swedish characters in Netscape e-mail 
> client? Decode the searchresult to a suitable encoding?

I know one way to solve this, but it might be a little too difficult for you -- 
it depends on whether you have access to a Perl guru.

I have an application that makes use of LDAPSEARCH via the command-line 
interface on a Linux system, for a Web application.  Because of similar issues 
with the display of UTF-8 characters, what I did was write a Perl wrapper 
around the LDAPSEARCH interface, that accepts the same parameters, makes the 
search, then returns the results, but with UTF-8 converted to ISO8559-1 (or 
HTML entities for HTML).

Now, you could do the same thing with Perl via a socket.  Reconfigure SLAPD to 
listen to a different port (maybe 636?)  Then create a Perl daemon that listens 
to port 389, and which passes on what it gets to SLAPD, then munges the results 
as per your requirements.

I might be way off-base here, and there are performance issues, but it's a nice 
hack.  Hopefully someone smarter than me can come up with a way so that SLAPD 
can format its output using HTML entities.  :-)

Yet another option is to make the Netscape client use a Unicode font.  For 
example, see the folliwng URL:

http://developer.netscape.com/docs/manuals/directory/install30/gateway.htm

I'll paste the relevant part for you below:


Configuring Communicator 4.x
To configure the Communicator 4.x, do the following:


Install a font that supports Unicode. 

Go to the Navigator panel Edit|Preferences|Appearance|Fonts. 

In the "For the Encoding" pull-down menu, select Unicode. 

In the Variable Width Font pull-down list, select a Unicode font set (for 
example, Bitstream Cyberbit). 

In the Fixed Width Font pull-down list, select a Unicode font set (for example, 
Bitstream Cyberbit). 

Configure the browser for the preferred language. Go to 
Edit|Preferences|Browser|Languages. Configure the list of languages so that the 
best description of the user's language is first, followed by less-exact 
descriptions and other acceptable languages. For example, a speaker of British 
English who also reads Spanish might list English/United Kingdom [en-GB] first, 
followed by English [en] and then Spanish [es]. 

Hope this helps!

cheers
Paul Gillingwater