Jump to content

Encoding bug in class /IPS/Lang


Nakamura RTS

Recommended Posts

I was trying to setup a local development version of the site and I came across an issue in which the method \IPS\Lang::convertString gets called, but executes with issues.

In this function there is custom-functionality that tries to convert the text passed into it from a CP-format to UTF-8, but in my case it the charset it found was already UTF-8.

Upon calling iconv the charset that it provided as input became a non-existent "CPUTF-8", which caused issues.

As a temporary fix I added a naïve prevention check for when the codepage is UTF-8 to simply return the text as-is. I was hoping you official devs could provide me with a better answer to this issue, or if this is actually a bug, that it may be fixed in a future patch. Thank you very much.

Link to comment
Share on other sites

The function only performs a conversion if you are using Windows, which does not use UTF-8 for its locales (hence the need to convert from whatever codepage is in use to UTF-8). As this only supports Windows (which is fairly nonstandard for a web server environment) the issue is fairly low impact but if you have a reproducible test case you can show us please feel free to submit a ticket so we can investigate.

Link to comment
Share on other sites

I'm not really sure how to answer that.

I use Windows locally for development and have had no issues. If there's a problem, we'd need a ticket submitted so we can investigate. It's perfectly fine to point back to topics here when submitting a ticket to show that we've asked you to submit said ticket. 🙂 

Link to comment
Share on other sites

Archived

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...