Hello, What exception is thrown? We made some modifications in unicode handling, but your use case looks ok.
Best regards, Wim. 2010/12/3 但浩亮 <[email protected]>: > My app works fine with wt-3.1.5 but fails with v3.1.6 if database > query contains Chinese characters. > It seems changes of dbo implementations in v3.1.6 introduce some bug > dealing with non-ASCII characters. > I'll demostrate this issue by inserting a piece of code snippet in > BlogImpl::refresh() in the blog.wt example project. > > void refresh() { > dbo::Transaction t1( session_ ); > std::cerr << session_.query<int>( "select count(*) from user" ) > .where("name = ?").bind(tr("test-name")) << std::endl; > t1.commit(); > dbo::Transaction t2( session_ ); > std::cerr > << session_.query<int>( > "select count(*) from user where name = \"" > + tr("test-name").toUTF8() + "\"" ) << std::endl; > > t2.commit(); > handlePathChange(wApp->internalPath()); > } > > The t1's query and t2's are equal, right? > But see the test result: > (1) wt-3.1.5, tr("test-name") is ASCII: t1 OK, t2 OK > (2) wt-3.1.5, tr("test-name") is Chinese: t1 OK, t2 OK > (3) wt-3.1.6, tr("test-name") is ASCII: t1 OK, t2 OK > (4) wt-3.1.6, tr("test-name") is Chinese: t1 OK, t2 fails, exception throwed > > My app use the form of t2 and I have to transform them to t1 to "fix" > the problem. > However, there must be a bug somewhere. > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > witty-interest mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/witty-interest > ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ witty-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
