Skip to content

Commit

Permalink
Fix UTF-8 support with Ruby 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmelt committed Oct 17, 2010
1 parent 1fd6ae5 commit d90c19a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.txt
@@ -1,12 +1,19 @@
qtbindings Changelog:
-----------------
v4.6.3.0
2010/07/27 - Apply Ryan Melton's patches to build on Windows
2010/07/27 - Apply Ryan Melton's patch to fix ExtraSelection
2010/07/28 - Sync with kde-bindings trunk rev 1156258
2010/07/28 - Apply Paolo Capriotti's patch to handle long long type
2010/07/28 - Apply Paolo Capriotti's patch for deferred objects
2010/07/28 - Apply Paolo Capriotti's patch for marking QGraphicsEffect
2010/07/28 - Sync with kde-bindings trunk rev 1156329

v4.6.3.1
2010/09/21 - Update examples to work with Ruby 1.9.2
2010/09/21 - Fix 4 examples
2010/09/21 - Sync with kde-bindings trunk rev 1178034

v4.6.3.2
2010/10/14 - Handle ambiguous results with method lookup
2010/10/15 - Fix bug with UTF-8 support
2 changes: 1 addition & 1 deletion ext/ruby/qtruby/src/handlers.cpp
Expand Up @@ -1008,7 +1008,7 @@ qstringFromRString(VALUE rstring) {
encoding = rb_funcall(encoding, rb_intern("to_s"), 0);
const char * enc_s = RSTRING_PTR(encoding);

if (qstrcmp(enc_s, "UTF8") == 0) {
if (qstrcmp(enc_s, "UTF-8") == 0) {
return new QString(QString::fromUtf8(StringValuePtr(rstring), RSTRING_LEN(rstring)));
} else if (qstrcmp(enc_s, "EUC-JP") == 0) {
codec = QTextCodec::codecForName("eucJP");
Expand Down

0 comments on commit d90c19a

Please sign in to comment.