其中编码是0xDB的货币符号? [英] In which encoding is 0xDB a currency symbol?

查看:760
本文介绍了其中编码是0xDB的货币符号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到的文件,可悲的是,我不能获得有关如何生成的信息。我需要解析这些文件。



除了一个字符,文件完全是ASCII:0xDB(十进制,它给出219)。



显然(从查看文件)这个字符是一个货币符号。我知道这是因为:




  • 这些文件必须包含货币符号。


  • 每当0xDB出现在金额旁边
    ul>

    我认为在这些文件中,0xDB应该代表欧元符号(实际上很可能这个0xDB出现在任何地方欧元符号

    命令说明了这些文件:

      ISO-8859英语文本,带有CRLF,LF行终止符

    An hexdump 可以:

      00000030 71 75 61 6e 74 20 db 32 2e 36 30 0a 20 41 49 4d | quant .2.60。 AIM | 
    ^^ ^

    这些文件通常都格式化/可解析。实际上,除了那个怪异的0xDB字符,我得到所有的信息。



    有人知道发生了什么吗?



    它既不是ISO-8859-1(也称为ISO拉丁文1),也不是ISO-8859-15因为在这两种情况下,代码点219对应于'Û'(正如Unicode代码点219是'LATIN CAPITAL LETTER U WITH CIRCUMFLEX')。



    它不是扩展ASCII。

    解决方案

    a href =http://en.wikipedia.org/wiki/Mac_OS_Roman> Mac OS Roman


    I received files which, sadly, I cannot get info about how they were generated. I need to parse these files.

    The file is entirely ASCII besides for one character: 0xDB (in decimal it gives 219).

    Obviously (from looking at the file) this character is a currency symbol. I know it because:

    • it is mandatory for these files to contain a currency symbol anywhere an amount appears
    • there's no other currency symbol (neither $ nor euro nor nothing) nowhere in the files
    • everytime that 0xDB appears it's next to an amount

    I think that in these files that 0xDB is supposed to represent the Euro symbol (it is actually very highly probable that this 0xDB appears everywhere a Euro symbol is supposed to appear).

    The file command says this about the files:

    ISO-8859 English text, with CRLF, LF line terminators
    

    An hexdump gives this:

    00000030  71 75 61 6e 74 20 db 32  2e 36 30 0a 20 41 49 4d  |quant .2.60. AIM|
                                ^^                                     ^
    

    The files are all otherwise normally formatted/parsable. Actually I'm getting all the infos fine besides for that weird 0xDB character.

    Does anyone know what's going on? How did a currency symbol (supposedly the euro symbol) somehow become a 0xDB?

    It's neither ISO-8859-1 (aka ISO Latin 1) nor ISO-8859-15 because in both case code point 219 corresponds to 'Û' (just as Unicode codepoint 219 is 'LATIN CAPITAL LETTER U WITH CIRCUMFLEX').

    It's not extended-ASCII.

    解决方案

    It could be Mac OS Roman

    这篇关于其中编码是0xDB的货币符号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆