X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tests%2Ftest-i18n.lisp;h=92aa8d069e7cd1199da5df8c7880195527c47526;hb=1a446890f95ab363af82529a133546d722ef21b1;hp=59f9b7aa2293c51100febf6728402a401468424c;hpb=4a2e3a71a1ce79482ba704ec815013de2c986274;p=clsql.git diff --git a/tests/test-i18n.lisp b/tests/test-i18n.lisp index 59f9b7a..92aa8d0 100644 --- a/tests/test-i18n.lisp +++ b/tests/test-i18n.lisp @@ -4,10 +4,10 @@ ;;;; ;;;; Name: test-i18n.lisp ;;;; Purpose: Tests for passing non-ascii encoded strings to db and back -;;;; Author: Nathan Bird +;;;; Author: Nathan Bird & Kevin M. Rosenberg ;;;; Created: Feb 2010 ;;;; -;;;; This file, part of CLSQL, is Copyright (c) 2002-2010 by Kevin M. Rosenberg +;;;; This file is part of CLSQL. ;;;; ;;;; CLSQL users are granted the rights to distribute and use this software ;;;; as governed by the terms of the Lisp Lesser GNU Public License @@ -16,17 +16,24 @@ (in-package #:clsql-tests) +(setq *rt-i18n* + '( + ;;; The point of these two is to require proper encoding support ;;; UTF-8 for example can handle these easily. ;; I show this as a 20char string and 27 bytes in utf-8 (deftest :basic/i18n/1 - (first (query "SELECT 'Iñtërnâtiônàlizætiøn'" - :flatp t :field-names nil)) - "Iñtërnâtiônàlizætiøn") + (let ((uffi:*default-foreign-encoding* :utf-8)) + (first (query "SELECT 'Iñtërnâtiônàlizætiøn'" + :flatp t :field-names nil))) + "Iñtërnâtiônàlizætiøn") ;; the z in this one is even stronger ;; I show this as a 20char string and 28 bytes in utf-8 (deftest :basic/i18n/2 - (first (query "SELECT 'Iñtërnâtiônàližætiøn'" - :flatp t :field-names nil)) - "Iñtërnâtiônàližætiøn") + (let ((uffi:*default-foreign-encoding* :utf-8)) + (first (query "SELECT 'Iñtërnâtiônàližætiøn'" + :flatp t :field-names nil))) + "Iñtërnâtiônàližætiøn") + +))