Bugzilla – Attachment 431784 Details for
Bug 683881
Incorrect Russian characters in Yast messages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
Patch
russian_characters_bnc683881.diff (text/plain), 1.25 KB, created by
Thomas Göttlicher
on 2011-05-27 10:16:01 UTC
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Thomas Göttlicher
Created:
2011-05-27 10:16:01 UTC
Size:
1.25 KB
patch
obsolete
>Index: libycp/src/YCPBuiltinFloat.cc >=================================================================== >--- libycp/src/YCPBuiltinFloat.cc (revision 63897) >+++ libycp/src/YCPBuiltinFloat.cc (working copy) >@@ -265,7 +265,24 @@ > return ret; > } > >+// bnc#683881 >+static std::string nbsp_fixed_string (const std::string& str) >+{ >+ std::string s; >+ const char *p; >+ unsigned char prev; > >+ p = str.c_str(); >+ for (; *p; p++) { >+ // fix invalid NBSP in ru or fi locales >+ if (prev == 0xc2 && (unsigned char)*p < 0x80) >+ s += (char)0xa0; >+ s += *p; >+ prev = *p; >+ } >+ return s; >+} >+ > // bnc#460094 > static YCPValue > f_tolstring (const YCPFloat &f, const YCPInteger &precision) >@@ -289,7 +306,7 @@ > ss.imbue (std::locale ("")); > ss.precision (precision->value ()); > ss << fixed<< f->value (); >- YCPString ret (ss.str ()); >+ YCPString ret (nbsp_fixed_string (ss.str ())); > > return ret; > } >Index: libycp/testsuite/tests/builtin/Builtin_VIII.out >=================================================================== >--- libycp/testsuite/tests/builtin/Builtin_VIII.out (revision 63897) >+++ libycp/testsuite/tests/builtin/Builtin_VIII.out (working copy) >@@ -22,7 +22,7 @@ > ("1.02") > ("1,02") > ("1024.09") >-("1Â024,09") >+("1Â 024,09") > (true) > (true) > (true)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 683881
:
422286
|
424882
|
425343
| 431784