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

Help text not in ascii mallformed after save #501

Closed
oknoproblem opened this issue Jul 22, 2014 · 10 comments
Closed

Help text not in ascii mallformed after save #501

oknoproblem opened this issue Jul 22, 2014 · 10 comments

Comments

@oknoproblem
Copy link

We were using Fitnesse version v20130530 and after changing to new version v20140418 (problem still exists in newest version v20140705) we got a problem that Help text in russian malformed after saving.

@oknoproblem
Copy link
Author

helptext

@stanio
Copy link
Contributor

stanio commented Jul 23, 2014

Appears to work for me on Windows, Java 6 Update 45, system default encoding Windows-1251 (Cyrillic), Firefox 31: both editing the Help text from the Page Properties, and the Edit Page form. The files get properly saved and read back using UTF-8. Could you provide exact steps to reproduce?

While I haven't been able to break it using Firefox and following steps, I've been able to break it the same way using Chrome (you appear to use):

  1. Go to Edit page;
  2. From the Chrome menu select Tools -> Encoding -> Windows-1251;
  3. After saving the broken encoding stays in place.

It appears Chrome remembers the encoding override for the page, although the page explicitly specifies UTF-8, and once you've accidentally changed the encoding, you're stuck with saving/getting the wrong data.

@oknoproblem
Copy link
Author

I can not not to reproduce this defect. And we have it on all our computers.
On mine:
Win 7 Enterprise
java version "1.7.0_10"
Java(TM) SE Runtime Environment (build 1.7.0_10-b18)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)
any browser (last versions).

steps:

  1. Open any page
  2. Fullfill Help text with russian in UTF-8 browser encoding
  3. Save page

Result:

helptext_002

@mgaertne
Copy link
Collaborator

Did you switch your browser mode to utf-8 or automatic handling? Which browser? What are your default encodings in the environmental variables?

Best Markus

Dipl.-Inform. Markus Gärtner
Author of ATDD by Example - A Practical Guide to Acceptance
Test-Driven Development

http://www.shino.de/blog
http://www.mgaertne.de
http://www.it-agile.de
Twitter: @mgaertne

On 24.07.2014, at 08:22, oknoproblem notifications@github.com wrote:

I can not not to reproduce this defect. And we have it on all our computers.
On mine:
Win 7 Enterprise
java version "1.7.0_10"
Java(TM) SE Runtime Environment (build 1.7.0_10-b18)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)
any browser (last versions).

steps:

  1. Open any page
  2. Fullfill Help text with russian in UTF-8 browser encoding
  3. Save page

Result:

text malformed and when i'm opening it for edit again it malformed too
in properties file it also saved like this: truetrueВася тут бага с кодеровкой!truetruetruetruetruetrue

Reply to this email directly or view it on GitHub.

@oknoproblem
Copy link
Author

yes
helptext_003

any browser (tried in IE FF Chrome)
there is no default encodings in the environmental variables in windows, but when i'm using such param to start fitnesse it worked:
-Dfile.encoding=UTF8
so run.bat looks like this and it worked.
call java -Dfile.encoding=UTF8 -jar fitnesse-standalone.jar -e 0 -p 8049

I dont know how to see default value of this param.

@amolenaar
Copy link
Collaborator

The difference is that the help text is saved as part of the properties.xml file for the page. Is the content saved correctly in the properties.xml file?

@oknoproblem
Copy link
Author

Content? Which one? There is only help text in properties.xml file.
In content.xml file everything is ok without addintional java utf8 parammeter.

@amolenaar
Copy link
Collaborator

I'm curious if the problem occurs while writing the properties file or while reading it. So if the help text ends up correctly in the properties file, the issue is with reading back the help text. Right?

@oknoproblem
Copy link
Author

thats not about #428, properties file not corrupted after saving in my case. Only value of help text not correctly encoded.

@amolenaar
Copy link
Collaborator

Does 20150114 or newer expose the same problem? (Please re-open if it does)

@amolenaar amolenaar changed the title Help text not in ascii mailformed after save Help text not in ascii mallformed after save Nov 29, 2016
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

4 participants