Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encoding issues with method clean() #44

Closed
RubenVP2 opened this issue Jun 11, 2024 · 1 comment
Closed

Encoding issues with method clean() #44

RubenVP2 opened this issue Jun 11, 2024 · 1 comment

Comments

@RubenVP2
Copy link

RubenVP2 commented Jun 11, 2024

Hello,

I'm working in project with iso-8859-15, when I pass string var to .clean() method some char are not correctly encoded.

Example str = "1 comprimé à faire dans la journée", output :

image

# -*- coding: iso-8859-15 -*-
import nh3

string = "1 comprimé à avaler par jour"

print(nh3.clean(string)) # 1 comprimé à avaler par jour

How can I bypass this, I want to clean my str but keep my char "à" ?

I'm looking for ideas, I have tried this below but make too many issues in my project : (here encoding='iso-8859-15')

Code_ufZ7zYHBHY

@RubenVP2
Copy link
Author

I close this issue, was a problem with string from jquery.serialize() !

Nice job, this lib is insane !
Take care

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant