jEdit Community - Resources for users of the jEdit Text Editor
Wrong glyphs for some unicode characters in Java
Submitted by Anonymous on Wednesday, 5 January, 2005 - 22:55
In Linux I use a customized keyboard mapping which gives me access to unicode characters I often need to type. But some of them, strangely, are wrongly displayed in jEdit. For example,
\u012b is displayed as \u03ef
\u016b as \u03fe
\u014d as \u03f2
\u0101 as \u03e0
\u0111 as \u01f0
\u0113 as \u03ba
etc
So for each of these cases I need a work-around by redefining the key that generates the wrong glyph with a shortcut to a macro which writes the correct character. For instance the shortcut Alt-a activates a bsh macro containing the line
textArea.setSelectedText("\u0101")
which prints "Ä?" (a macron) instead of \u3e0 which is Greek sampi!

I checked with other Java GUI apps having Unicode support (such as JabRef): the very same bug occurs again! So this must be a general Java bug (some mess in the Unicode tables?) Yet might it be possible to fix this in a future version of jEdit by somehow circumventing this mess through an appropriate patch? Sorry if I can't help much myself, as I am not a Java programmer.

Any idea?

Thanks,
François

PS: I run J2RE 1.5.0_01-b08 on Linux. The problem also occurs with J2RE 1.4.2_06-b03.
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
Re: Wrong glyphs for some unicode characters in Java
by Anonymous on Fri, 14/01/2005 - 15:46
I can't speak for jEdit, but I've had similar problems with JabRef. What worked for me was setting the environment variable "LANG" to the correct localisation. I'm in Norway, so I used 'export LANG="no_NO"', and this solved my problem. If you are having a similar problem, maybe this works for you as well.


Regards,
Morten Alver
User login
Browse archives
« March 2024  
MoTuWeThFrSaSu
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Poll
Are you interested in language packs for jEdit?
Yes, and I could help maintain translations
26%
Yes, I'd like to have translations
32%
Indifferent
35%
No, that'd be bad (please comment)
7%
Total votes: 1093
Syndication
file   ver   dls
German Localization light   4.4.2.1   82338
Context Free Art (*.cfdg)   0.31   46042
JBuilder scheme   .001   18486
BBEdit scheme   1.0   18107
ColdFusion scheme   1.0   18015
R Edit Mode - extensive version   0.1   17461
Advanced HTML edit mode   1.0   16194
Matlab Edit Mode   1.0   16056
jEdit XP icons   1.0   15220
XP icons for jEdit   1.1   14281