Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lua with sqlite3 for saving unicode characters #402

Open
GoogleCodeExporter opened this issue Mar 16, 2015 · 1 comment
Open

Lua with sqlite3 for saving unicode characters #402

GoogleCodeExporter opened this issue Mar 16, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

From .lp page it is not possible to show characters in unicode.
I added unicode characters using sqlite3 console application.

<database value input - manually>
sqlite> insert into test ('1', '한글');

when I try to show this row the characters are broken.

<.lp code>

stmt = db:prepare('SELECT * FROM test;')
    while stmt:step() == sqlite3.ROW do
        local v = stmt:get_values()
        mg.write(v[1] .. ' ' .. v[2] .. ' ' .. v[3] .. ' '.. v[4] .. ' ' .. v[5] .. ' ' .. v[6] .. ' ' .. v[7] ..'<br>')
  end

<result in browser>
1234 �ѱ���


* Additionally sqlite in Lua pages cannot save cannot save unicode characters 
properly.

Original issue reported on code.google.com by [email protected] on 23 Aug 2013 at 1:13

@GoogleCodeExporter
Copy link
Author

I converted all characters into UTF-8 format-based characters whenever I store 
string data into sqllight database. (ex> Insert into test values ('%3%1%d%a')) 


Original comment by [email protected] on 4 Jul 2014 at 7:28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant