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 should be passed as NSStringEncoding, not NSString #34

Open
gdaolewe opened this issue Oct 24, 2013 · 1 comment
Open

Encoding should be passed as NSStringEncoding, not NSString #34

gdaolewe opened this issue Oct 24, 2013 · 1 comment

Comments

@gdaolewe
Copy link

Now that we can initialize a TFHpple with an encoding parameter, one has to search through the libxml2 code to find what literal values are allowed for the encoding. This is not in keeping with the way string encoding is handled throughout Objective-C. Instead hppleWithHTMLData: encoding: and similar methods should take an NSStringEncoding enum, such as NSUTF8StringEncoding or NSISOLatin1StringEncoding, and then pass the appropriate encoding string to libxml2.

Unfortunately this would break compatibility of the API for anyone already using the new with-encoding methods; perhaps still more methods like hppleWithHTMLData: enumEncoding: should be created?

@eappel
Copy link

eappel commented Sep 2, 2015

Do you know I can find the string value for NSUTF8StringEncoding?

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

2 participants