jonhoo / jonhoo/rust-imap

Feature request: support search Non-ASCII characters

Open
#278 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
583
Forks
94
PR merge metrics
No merged PRs in 30d

Description

#### Use `uid_search` directly
```rust
let query = "UID SEARCH CHARSET UTF-8 BODY {6}\r\n测试";
imap_session.uid_search(query)
```
resp: `Error: Unexpected Response: Continue { code: None, information: Some("send literal data") }`

### Use `run_command_and_read_response`

```rust
let query = "UID SEARCH CHARSET UTF-8 BODY {6}\r\n测试";
let rsp = imap_session.run_command_and_read_response(query).unwrap();
println!("{:?}", String::from_utf8_lossy(&rsp));
```

resp: `"+ send literal data\r\n* SEARCH 11111\r\n* FLAGS (\\Answered \\Deleted \\Draft \\Flagged \\Seen $Forwarded $MDNSent Forwarded $Junk $NotJunk Junk JunkRecorded NonJunk NotJunk $label3 $label2 $label4)\r\n"`

ref: https://stackoverflow.com/questions/10131131/imap-search-command-with-utf-8-charset-in-c-sharp

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.