NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

hello

alt text

I installed osm on my Ubuntu server, as shown in the photo below. The Korean language, Hangul, however, retrieve broken.

I faithfully as a guide, but many times, even if you tried any of these symptoms appear.

The procedure below.(Very simple)

  1. sudo add-apt-repository ppa:kakrueger/openstreetmap
  2. sudo apt-get update
  3. sudo apt-get install libapache2-mod-tile
  4. wget http://download.geofabrik.de/openstreetmap/europe/ireland.osm.pbf

·

  • sudo su - postgres
  • createdb osm
  • createlang plpgsql osm
  • createuser <username>

·5. osm2pgsql --slim -C 1500 ireland.osm.pbf

·6. restart …


Below is the result of my test.

  1. create test.php -> <? echo("대한민국"); ?> OK
  2. login psql -> show clinet encoding? OK - UTF-8
  3. PHP-CHARSET : line comment -> UTF-8
  4. using josm, open the character map check OK

What is the problem?....... bohoo....

asked 22 Apr '13, 03:40

sgGold's gravatar image

sgGold
15222
accept rate: 0%

edited 24 Apr '13, 01:05

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554


Make sure that you have the "unifont" font installed (sudo apt-get install ttf-unifont) and that your fontset-settings.inc file correctly references the "unifont Medium" font.

permanent link

answered 22 Apr '13, 09:58

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

1

Thank you for answer. I as directed, using the command "sudo apt-get install ttf-unifont" The installation finished successfully, reboot.

Sadly, the result was the same. , "Fontset-settings.xml" I open the file but it was in the set. You, the font is installed correctly, there should not?


mtis @ ubuntu: ~ $ sudo find /-name unifont * / usr / share / fonts / truetype / unifont / usr / share / fonts / truetype / unifont / unifont.ttf


(22 Apr '13, 10:27) sgGold
mtis @ ubuntu: ~ $ tail / etc / mapnik-osm-data / inc / fontset-settings.xml.inc
  <! - Font face-name = "unifont Medium" / ->
</ FontSet
<FontSet Name="bold-fonts">
  The <font face-name="DejaVu The Sans Bold" />
  <! - Font face-name = "unifont Medium" / ->
</ FontSet
<FontSet Name="oblique-fonts">
  The <font face-name="DejaVu The Sans Oblique" />
  <! - Font face-name = "unifont Medium" / ->
</ FontSet
(22 Apr '13, 10:28) sgGold

Your comment comes out a bit garbled, but notice that the character combination "less than" "exlamation mark" "minus" "minus" is the beginning of a comment in XML ("minus" "minus" "greater than" is the end of a comment) so it looks like the unifont might be commented out in your fontset-settings.inc?

(23 Apr '13, 18:55) Frederik Ramm ♦

(meta @Frederik Ramm: fixed the code formatting)

(23 Apr '13, 23:38) aseerel4c26 ♦

Thank you.I did not know that it is there, the line block. However, on the DejaVu font, erase Leaving Unifont only Does not generate tiles ...

I think, to get back to after the following procedure to install the font. What do you think?

I'm confused. Boohoo

(29 Apr '13, 03:26) sgGold

Not all fonts are able to display all UTF-8 characters. The DejaVu font for example doesn't appear to be able to display Korean characters, which is what leads to your problem.

Mapnik, the rendering library used to generate the tiles, has the ability to use alternative fonts for those characters that aren't supported by the default font. This alternative font is specified (as you have now done) in the style sheet in font-settings.xml.inc.

In addition, however, you need to tell mapnik where to find this alternative font. As you are using renderd as your driver for mapnik, the way you tell mapnik where to look for the fonts is in /etc/renderd.conf

In that file, there is a configuration parameter font_dir ( https://github.com/openstreetmap/mod_tile/blob/master/debian/renderd.conf#L9 ) and font_dir_recurse. In the default /etc/renderd.conf these parameters are set wrong, as they point directly to the dejavu font, rather than the generic font dir and then recurse in to load all fonts.

So if you set font_dir_recurse to true and then change font_dir to the generic /usr/share/fonts/truetype/ you should hopefully get mapnik to load the unifont, which should then render the Korean characters correctly.

The Ubuntu 13.04 packages I uploaded a couple of days ago should have this fixed, but I haven't uploaded corrected packages yet for the older versions of Ubuntu.

permanent link

answered 29 Apr '13, 10:26

apmon's gravatar image

apmon
6.5k184456
accept rate: 20%

1

Thank you. Has been resolved. I'm very happy.

Thank you

(30 Apr '13, 02:30) sgGold

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×44
×3
×1

question asked: 22 Apr '13, 03:40

question was seen: 33,994 times

last updated: 30 Apr '13, 02:30

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum