Z-Push icon indicating copy to clipboard operation
Z-Push copied to clipboard

Add configuration for //IGNORE and //TRANSLIT for iconv

Open matidau opened this issue 1 year ago • 0 comments

We could add //IGNORE to the charset string, but this will cause the characters to drop. Not sure this is desirable behaviour.

https://www.php.net/manual/en/function.iconv.php

If the string //IGNORE is appended, characters that cannot be represented in the target charset are silently discarded. Otherwise, E_NOTICE is generated and the function will return false.

There is also //TRANSLIT but this still has a chance of returning false, depending on the implementation. If this is used we would need to then check the result and call it again with //IGNORE to ensure that it always works.

Ideally we would make a config variable so this can be defined per system, this makes it a less simple bug fix though, possibly more a feature, so would prefer to handle in another PR.

Originally posted by @matidau in https://github.com/Z-Hub/Z-Push/pull/21#issuecomment-1694776010

matidau avatar Sep 02 '23 22:09 matidau