Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Can't handle some UTF-8 text #5

@Br1ght0ne

Description

@Br1ght0ne

Describe the bug
When trying to find this amazing art piece with so how to parse html with regex, so panics with byte index 168 is not a char boundary error.

Full error
$ so how to parse html with regex
thread 'main' panicked at 'byte index 168 is not a char boundary; it is inside '\u{329}' (bytes 167..169) of `rè̑ͧ̌aͨl̘̝̙̃ͤ͂̾̆ ZA̡͊͠͝LGΌ ISͮ̂҉̯͈͕̹̘̱ T</b>O͇̹̺ͅƝ̴ȳ̳ TH̘<b>Ë͖́̉ ͠P̯͍̭O̚​N̐Y̡ H̸̡̪̯ͨ͊̽̅̾̎Ȩ̬̩̾͛ͪ̈́̀́͘ ̶̧̨̱̹̭̯ͧ̾ͬCͭ̏ͥͮ`', C:\Users\brigh\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/src/rust\src\libcore\str\mod.rs:2052:47
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

To Reproduce
Steps to reproduce the behavior:

  1. CLI arguments (including defaults):
  • so how to parse html with regex, no additional arguments
  • config.yml:
---
api_key: ~
limit: 20
lucky: false
sites:
  - stackoverflow
  - superuser
  - serverfault
  - unix
search_engine: duckduckgo # stackexchange, google
  1. TUI input: none

Screenshots

изображение

Environment

  • OS: Windows 10
  • Terminal: Windows Terminal Preview
  • so --version: so 0.3.6
Additional context

Don't question my testing approach. Z̶͕͎͇͝Ä̶͍̝̞́͜L̶͔̤͗̾͠G̶̫̱̾O̸̙̊ ̸̪̩̈͛̚C̶̛͓͈̩̄̂Ȏ̵̙͈͋̍̃M̶̥̙̈́E̸̙̰̠͇̅̃͂̂T̶͎̜̥̱́̔̆̇H̷̛̪͚̝̺͌͘

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingupstreamThis issue is being tracked upstream

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions