mirror of
https://github.com/sqlite/sqlite.git
synced 2026-01-06 08:01:16 +03:00
Fix .import bug reported at https://sqlite.org/forum/forumpost/14db09d7e765b819 . zAutoColumn made to deliver characters, not bytes.
FossilOrigin-Name: 21e96600d90c1cda84777abe22a11058eba46c9faefeb05f8c31bc0e7fa84b19
This commit is contained in:
@@ -540,4 +540,34 @@ Columns renamed during .import shell5.csv due to duplicates:
|
||||
"CoW" to "CoW_3",
|
||||
"cOw" to "cOw_4"}}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Tests for preserving utf-8 that is not also ASCII.
|
||||
#
|
||||
|
||||
do_test shell5-6.1 {
|
||||
set out [open shell5.csv w]
|
||||
fconfigure $out -translation lf
|
||||
puts $out {あい,うえお}
|
||||
puts $out {1,2}
|
||||
close $out
|
||||
forcedelete test.db
|
||||
catchcmd test.db {.import -csv shell5.csv t1
|
||||
.mode line
|
||||
SELECT * FROM t1;}
|
||||
} {0 { あい = 1
|
||||
うえお = 2}}
|
||||
|
||||
do_test shell5-6.2 {
|
||||
set out [open shell5.csv w]
|
||||
fconfigure $out -translation lf
|
||||
puts $out {1,2}
|
||||
puts $out {あい,うえお}
|
||||
close $out
|
||||
forcedelete test.db
|
||||
catchcmd test.db {.import -csv shell5.csv t1
|
||||
.mode line
|
||||
SELECT * FROM t1;}
|
||||
} {0 { 1 = あい
|
||||
2 = うえお}}
|
||||
|
||||
finish_test
|
||||
|
||||
Reference in New Issue
Block a user