小编Joh*_*gle的帖子

什么8位字符集是0x9d有意义?

用于英语的8位ASCII字符集是否0x9d有意义?我正在清理一些旧的数据文件,偶尔会找到一个0x9dASCII文本.(不,它不是UTF-8.)

它在Windows-1252中无效.Python"latin-1"编解码器将其转换为Unicode 0x9D,即"操作系统命令".这没什么意义.在Unicode中,您将获得一个包含[009d]的框.(在Python中,您可以将任何内容转换为Latin-1而不会引发错误,但这并不意味着这样做是有意义的.)

使用Python类型转义的示例,来自凌乱的数据库,我正在清理它,它结合了许多来源的文本:

Guitar Pro, JamPlay, RedBana\\\'s Audition,\x9d Doppleganger\x99s The Lounge\x9d or Heatwave Interactive\x99s Platinum Life Country,\\"

for example \\"I\\\'ve seen the bull run in Pamplona, Spain\x9d.\\" Everything

Netwise Depot is  a \\"One Stop Web Shop\\"\x9d that provides sustainable \\"green\\"\x9d living

are looking for a \\"Do It for Me\\"\x9d solution
Run Code Online (Sandbox Code Playgroud)

从背景来看,我怀疑是™或®.但那些8位代码有那些?

python string unicode utf-8 character-encoding

6
推荐指数
2
解决办法
2409
查看次数

无法从"使用"中包含的外部包装箱中找到符号

我正在尝试在Github上使用来自crates的一些Rust库.这是我第一次尝试这样做.从"html"库示例中提取的代码如下所示:

mod interactive_test {
    extern crate http;
    extern crate url;
    use std::os;
    use std::str;
    use url::Url;

    use http::client::RequestWriter;
    use http::method::Get;
    use http::headers::HeaderEnum;
    // ...
}

fn main() {}
Run Code Online (Sandbox Code Playgroud)

错误看起来像这样:

error[E0432]: unresolved import `url::Url`
 --> src/main.rs:7:9
  |
7 |     use url::Url;
  |         ^^^^^^^^ Did you mean `self::url`?

error[E0432]: unresolved import `http::client::RequestWriter`
 --> src/main.rs:9:9
  |
9 |     use http::client::RequestWriter;
  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Did you mean `interactive_test::http`?

error[E0432]: unresolved import `http::method::Get`
  --> src/main.rs:10:9
   |
10 |     use http::method::Get;
   |         ^^^^^^^^^^^^^^^^^ Did you mean `self::http::method`? …
Run Code Online (Sandbox Code Playgroud)

rust rust-cargo

3
推荐指数
1
解决办法
2955
查看次数

标签 统计

character-encoding ×1

python ×1

rust ×1

rust-cargo ×1

string ×1

unicode ×1

utf-8 ×1