59f9b7aa2293c51100febf6728402a401468424c
[clsql.git] / tests / test-i18n.lisp
1 ;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
2 ;;;; *************************************************************************
3 ;;;; FILE IDENTIFICATION
4 ;;;;
5 ;;;; Name:    test-i18n.lisp
6 ;;;; Purpose: Tests for passing non-ascii encoded strings to db and back
7 ;;;; Author:  Nathan Bird
8 ;;;; Created: Feb 2010
9 ;;;;
10 ;;;; This file, part of CLSQL, is Copyright (c) 2002-2010 by Kevin M. Rosenberg
11 ;;;;
12 ;;;; CLSQL users are granted the rights to distribute and use this software
13 ;;;; as governed by the terms of the Lisp Lesser GNU Public License
14 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
15 ;;;; *************************************************************************
16
17 (in-package #:clsql-tests)
18
19 ;;; The point of these two is to require proper encoding support
20 ;;; UTF-8 for example can handle these easily.
21 ;; I show this as a 20char string and 27 bytes in utf-8
22 (deftest :basic/i18n/1
23     (first (query "SELECT 'Iñtërnâtiônàlizætiøn'"
24                   :flatp t :field-names nil))
25   "Iñtërnâtiônàlizætiøn")
26
27 ;; the z in this one is even stronger
28 ;; I show this as a 20char string and 28 bytes in utf-8
29 (deftest :basic/i18n/2
30     (first (query "SELECT 'Iñtërnâtiônàližætiøn'"
31                   :flatp t :field-names nil))
32   "Iñtërnâtiônàližætiøn")