Может ли iconv преобразовать кодировку символов?

692
zefciu

Мне нужно конвертировать некоторые файлы на греческом языке, которые закодированы для использования со шрифтом «Symbol» в Unicode. Могу ли я использовать iconv для этого? И если да, то как называется кодировка, которая используется в «Symbol»?

2

2 ответа на вопрос

1
Snewsley Pies

You might be in for a tough ride. In origin, Symbol used a non-standard character set that was essentially made up for the font, allotting characters to ASCII codepoints by visual similarity to Roman alphabet characters; there is a description of how that encoding maps to Unicode at http://unicode.org/Public/MAPPINGS/VENDORS/ADOBE/symbol.txt which you might find handy.

I imagine it might be tricky to persuade iconv to do what you want - you may have to resort to some scripting work to directly transcode each character.

1
harrymc

You might possibly use the online converter found in this website:
Symbol font to Unicode converter.

This article contains a long list of converters, where the author "have gathered all the Greek font converters of which I am aware" (but I wouldn't know which one to recommend):
Greek Legacy Fonts to Unicode Converters.

Otherwise, you will probably have to create your own conversion tool.

The article Convert symbol to unicode deals mostly with HTML files that represent, for example, the character Ω via :

<font face="symbol">W</font> 

The article includes the source-code for a program that converts such HTML files, written in some unidentified programming language.

Another such article is How to convert Symbol font to standard utf8 HTML entity.

Otherwise, one too-simple method might be to use some word-processor to just select the text and change its font, but is probably too simple to work.

You might post a minimal example file that will help us understand what kind of conversion is required.

Похожие вопросы