First time here? Check out the FAQ!
0

character encoding

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?

nicklauren's avatar
nicklauren
asked 2015-12-14 17:52:18 -0500
bwolven's avatar
bwolven
updated 2016-08-18 17:25:50 -0500
edit flag offensive 0 remove flag close merge delete

Comments

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

mdean's avatar mdean (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's avatar bwolven (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's avatar nicklauren (2015-12-15 12:49:06 -0500) edit
add a comment see more comments

1 Answer

0

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');
mdean's avatar
mdean
answered 2015-12-15 20:55:54 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Login/Signup to Answer