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

UTF-8 Encoding #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

UTF-8 Encoding #10

wants to merge 1 commit into from

Conversation

ideonexus
Copy link

Encoding strings to UTF-8 prevents the return of null values when a
database value contains incompatible characters.

Encoding strings to UTF-8 prevents the return of null values when a
database value contains incompatible characters.
@@ -563,7 +587,7 @@ function object_to_xml( $array, $xml ) {

//simple key/value child pair
} else {
$xml->addChild( $key, $value );
$xml->addChild( $key, utf8_encode($value) );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be $this->utf8_encode($value)?

@benbalter
Copy link
Contributor

@waldoj are you able to test this by chance?

@waldoj
Copy link
Contributor

waldoj commented Nov 24, 2013

I'd need a use case to test this. Would this be when a database is encoding its contents as, say, ASCII, and a Unicode character had been included in the content?

@ideonexus
Copy link
Author

I looked into it further based on your question, and it may actually be a non-issue. The database tables are utf8, but I just noticed the database itself is latin. That might have been causing the problem. I've got work the next three days, but I'll do some test cases over the long weekend. What was happening is chinese characters and microsoft magic quotes where breaking the response. If modifying the database to utf8 and not just the tables prevents the problem, I'll let you know.

Thanks,

ry

@waldoj
Copy link
Contributor

waldoj commented Nov 25, 2013

That's really helpful—thanks so much for looking into this!

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

Successfully merging this pull request may close these issues.

None yet

3 participants