Jump to content

Convert variable into utf-8


garry27

Recommended Posts

I'm having trouble with a few pages on xcart with the charsets. The problem we're having is that we need to have both utf-8 and iso type charsets as we're getting garbled code on some pages. What I can do is set the utf-8 on all pages and then encode the garbled code into utf-8. Is there a function that does this in PHP or any modules I can use? Thanks

Link to comment
https://forums.phpfreaks.com/topic/220229-convert-variable-into-utf-8/
Share on other sites

Without knowing more about where the character encodings are defined and when you want to do the recoding, the mbstring and iconv extensions can both convert between text encodings - the former being a bit more reliable (IMO) than the latter.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.