Item13372: Encoding problems (utf8) on Macro arguments
Priority: Urgent
Current State: Closed
Released In: 1.2.0
Target Release: minor
Applies To: Engine
Component:
Branches: master
How to reproduce
Х Create UTF8 installation
- Create Any Topic
- Enter some macros, where the arguments are utf8, for example:
ссс
- Save
- Edit Again
- Save
- The utf8 text -> wrong encoding
Also, when in WYSIWYG switch to
NatEdit - in the
NatEdit the utf8 texts are screwed.
- screenshot_57.png:
- screenshot_59.png:
--
JozefMojzis - 14 Apr 2015
Is this
really on 1.2.0 or on 1.1.9? If the latter is the case then use this hotfix:
--- lib/Foswiki/Plugins/WysiwygPlugin/Constants.pm 2013-05-29 13:37:25.077642257 +0200
+++ lib/Foswiki/Plugins/WysiwygPlugin/Constants.pm 2014-05-22 16:10:40.000000000 +0200
@@ -328,7 +328,7 @@
}
}
HTML::Entities::_decode_entities( $_[0], $representable_entities );
- $_[0] = Encode::encode( encoding(), $_[0] );
+# $_[0] = Encode::encode( encoding(), $_[0] );
return $_[0];
}
--
MichaelDaum - 14 Apr 2015
My testing wiki says:
This site is running Foswiki release Foswiki-1.2.0_Beta_1, Plugin API version 2.3
(the tarbal no github fixes)
--
JozefMojzis - 14 Apr 2015
Try this now:
diff --git a/WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/HTML2TML/WC.pm b/WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/HTML2TML/WC.pm
index a68540b..cb1557f 100644
--- a/WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/HTML2TML/WC.pm
+++ b/WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/HTML2TML/WC.pm
@@ -429,7 +429,7 @@ sub decodeRepresentableEntities {
$encoded_nbsp = Encode::encode( WC::site_encoding(), $encoded_nbsp );
}
HTML::Entities::_decode_entities( $_[0], $representable_entities );
- $_[0] = Encode::encode( WC::site_encoding(), $_[0] );
+# $_[0] = Encode::encode( WC::site_encoding(), $_[0] );
# Replace expansion of with $WC::NBSP
$_[0] =~ s/$encoded_nbsp/$WC::NBSP/g;
lines 1-13/13 (END)
--
MichaelDaum - 14 Apr 2015
The patch was
almost right
--
CrawfordCurrie - 20 Apr 2015