Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 186486 Details for
Bug 238507
Ebuild for MySQL workbench
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for non-english locales
5.1.9-locale-hack.patch (text/plain), 1.12 KB, created by
Rodrigo Saboya
on 2009-03-27 22:12:05 UTC
(
hide
)
Description:
patch for non-english locales
Filename:
MIME Type:
Creator:
Rodrigo Saboya
Created:
2009-03-27 22:12:05 UTC
Size:
1.12 KB
patch
obsolete
>Index: library/grt/src/unserializer.cpp >=================================================================== >--- mysql-workbench-oss-5.1.9/library/grt/src/unserializer.cpp >+++ mysql-workbench-oss-5.1.9/library/grt/src/unserializer.cpp >@@ -245,11 +245,24 @@ > case DoubleType: > { > std::string tmp= get_content(node); >- >- if (tmp.find(',') != std::string::npos) >- { >- // hack in case the model was saved in a locale with , as decimal point >- tmp[tmp.find(',')]= '.'; >+ static char decimal_point= 0; >+ >+ // now this is a hack for locales that treat . as a thousand separator instead of >+ // decimal. 1st find out what is used as decimal point, then hackup the string to parse if >+ // needed >+ if (decimal_point == 0) >+ { >+ char buf[4]; >+ sprintf(buf, "%.1f", 0.0); // 0.0 >+ decimal_point= buf[1]; >+ } >+ >+ if (decimal_point != '.') >+ { >+ // serializer always saves using . as decimal >+ std::string::size_type dot= tmp.find('.'); >+ if (dot != std::string::npos) >+ tmp[dot]= decimal_point; > } > value= DoubleRef(strtod(tmp.c_str(), NULL)); > break; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 238507
:
182296
|
186012
| 186486 |
186487
|
187297
|
188503
|
188504
|
190605
|
190613
|
192478
|
196234
|
199635
|
201523
|
204490
|
204537
|
206508
|
206541
|
207928
|
208322
|
210563
|
210602
|
211503