Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error UTF8 to UTF16 #650

Closed
klausgh opened this issue Jul 17, 2015 · 1 comment
Closed

Error UTF8 to UTF16 #650

klausgh opened this issue Jul 17, 2015 · 1 comment

Comments

@klausgh
Copy link

klausgh commented Jul 17, 2015

about 5 months ago I wrote about a problem which I detected after porting a GEDCOM file from phpGEDVIEW to webtrees (v. 1.6.x). While editing records containing some german special characters (“ä”, “ö”, “ü”, “ß” etc.) I received several warnings.

Due to the fact that these warnings only occurred when I was logged in (editing the record) and no normal user has ever seen these warnings I kept going on without any changes.

Now I upgraded to version 1.7.1 and received the following massage:
#0 unknown:unknown ErrorException("iconv(): Wrong charset, conversion from UTF-8' toUTF-16BE' is not allowed")
#1 /app/Filter.php:72 iconv()
#2 unknown:unknown Fisharebest\Webtrees{closure}()
#3 /app/Filter.php:78 preg_replace_callback()
#4 /app/Controller/IndividualController.php:329 escapeJs()
#5 /app/Module/PageMenuModule.php:58 getEditMenu()
#6 /app/Theme/AbstractTheme.php:1511 getMenu()
#7 /app/Theme/AbstractTheme.php:1876 menuModules()
#8 /app/Theme/AbstractTheme.php:215 primaryMenu()
#9 /app/Controller/PageController.php:184 bodyHeader()
#10 /individual.php:45 pageHeader()

Again users who are not logged in don’t see this message. Nevertheless (and worse then before) I cannot continue to edit the respective record.

Therefore I tested it using another platform: I installed the Apache components and webtrees (v. 1.6.2 – unfortunately the upgrade to 1.7.1 could not be completed there) on a RasberryPi. When using this system I don’t receive any warnings or messages while editing the respective records.

Additionally I installed the actual version of Xanmpp at my desktop PC (incl. webtrees 1.71) and imported the GEDCOM-file to this platform. There3 are no error messages and I can gon on editing.

So I think the reason might be rather a difference between the installed version of php / MySQL on the productive platform (managed by german Telekom – with some special modifications) relative to the version I’m using on my RasberryPi - or Xampp.

Now I need some help in order to go on editing the respective records. Otherwise I need to go back to phpGEDVIEW – or editing at another platform and then everytimes uploading the new GEDVIEW to webtrees – which seems very inconvenient.

@fisharebest
Copy link
Owner

The error is in the code that generates the "Edit" entry in the menu. Hence it is only shown to someone with edit permission.

It is attempting to convert UTF8 characters into "javascript-style" escape seqeunces, which is also known as UTF16-BE.

It is doing this using the PHP/iconv library - which should be able to do this.

Perhaps your server does not have the PHP/iconv library - or one its dependencies? - installed correctly.

the upgrade to 1.7.1 could not be completed there) on a RasberryPi.

I'm afraid this is too vague to be able to offer any suggestions at all. Also, it helps to create separate issues for each problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants