Ask Your Question
0

character encoding

asked 2015-12-14 17:52:18 -0500

updated 2016-08-18 17:25:50 -0500

I'd like to thank you again for all the help on this forum...it's been so quick and incredibly helpful.

I have one last question and it has to do with the character encoding of the data they are returning. I'm seeing characters like this in the description fields:

20’x20’

The DB collation and charset are both utf8. Are they not returning utf8 data for their description? If not, what charset do they use so I can decode properly?

edit retag flag offensive close merge delete

Comments

All Paragon RETS responses are UTF-8 encoded. What client library are you using to perform downloads?

mdean gravatar imagemdean ( 2015-12-14 21:02:53 -0500 )edit

Also can you give a specific example of property and field where you are seeing the issue?

bwolven gravatar imagebwolven ( 2015-12-15 08:29:10 -0500 )edit

The library we're using is phrets. Not sure what's up, but there are lots of them showing this issue?

Thanks guys!

nicklauren gravatar imagenicklauren ( 2015-12-15 12:49:06 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2015-12-15 20:55:54 -0500

Have you tried adding something like this to the start of your PHP script? It looks like PHRETS does not utilize the mb functions (there is a strlen call that should be mbstrlen, for example). But, this is what I use in one of my PHP projects to set the PHP runtime to UTF-8 all around. There are some additional settings for the databases, too, depending on what you are using.

mb_internal_encoding('UTF-8');
mb_detect_order('UTF-8');
mb_regex_encoding('UTF-8');
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2015-12-14 17:52:18 -0500

Seen: 163 times

Last updated: Dec 15 '15