lvbin0127 / osm-android

Automatically exported from code.google.com/p/osm-android
0 stars 0 forks source link

Romanian special characters (diacritics) are not displayed correctly #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This may be something specific to the OS used for map conversion. 

What steps will reproduce the problem?
1. Convert a map of a Romanian region on a Windows machine.
2. Upload maps and update database on the device.
3. Start app and select View Map

What is the expected output? What do you see instead?
In the code the special characters are replaced, but it seems like not all
of them. We have 2 solutions:
a) support these characters in the app.
b) replace all of them at conversion time.

See attached screenshot.

Original issue reported on code.google.com by cipriant...@gmail.com on 8 Jul 2009 at 8:07

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by iulian.b...@gmail.com on 15 Jul 2009 at 3:32

GoogleCodeExporter commented 9 years ago

Original comment by cipriant...@gmail.com on 17 Aug 2009 at 12:08

GoogleCodeExporter commented 9 years ago
Changed priority to minor.

Original comment by cipriant...@gmail.com on 17 Aug 2009 at 12:08

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi, I have the same problem on MAC OS X. I was able to fix the problem. Patch 
is here:

Index: src/com/google/code/osmandroidconverter/main/MapBuilder.java
===================================================================
--- src/com/google/code/osmandroidconverter/main/MapBuilder.java    (revision 37)
+++ src/com/google/code/osmandroidconverter/main/MapBuilder.java    (working copy)
@@ -6,6 +6,8 @@
 import java.io.FileOutputStream;
 import java.io.FileWriter;
 import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.nio.charset.Charset;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -497,7 +503,7 @@

        try {

-           dataOut = new BufferedWriter(new FileWriter(path));
+           dataOut = new BufferedWriter(new OutputStreamWriter(new 
FileOutputStream(path),Charset.forName("UTF-8")));

            Iterator it = nameRecords.keySet().iterator();
            while (it.hasNext()) {

Original comment by tibor.arpas on 15 Sep 2010 at 3:54