WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

[Xen-users] Guest Domain with Japanese names (UTF-8) fails with UnicodeE

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-users] Guest Domain with Japanese names (UTF-8) fails with UnicodeEncodeError:ascii codec cant encode characters - Xen 3.2.0
From: "Ramachandran Radhakrishnan" <rama.radha@xxxxxxxxx>
Date: Mon, 12 Jan 2009 10:38:52 +0530
Delivery-date: Sun, 11 Jan 2009 21:09:44 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=52EHxWNqqkyP4LelkkOTKdCWwLvwkC2cLgqZksdYQoc=; b=pdI8/skHlogqccba7cnFKTd8fRciaQxbBik2dzGq8tOnXcXx6cXFo2ycVTv5p4HKOb t9t97Ki3sQvNVxIvhHp3JaHX5z2NBI74uKBJ2PlWSbA6++oIhUplwzO8qh+zUxeUjtFJ Zxli10U+2RTUKslKOZqEndbL1NHct/zlTNvPA=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=fgPPSNuP5+ZYNB6P8rXPOEgG4MwJXwPJmtqFPcKQm+SBDavfpsWS0pMgs/wD41BTxb 0acvJro6ecyyl4w9nuPCcCUoqn+zJjGSVGe65RCVathKa3tgu2sfo5l1jKNHy1Z3tIUq vTEuZJbwxrwZkSd5593NSl8uQ4em5Fx3CcffE=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Hello,

I try to create a domain with Japanese name encoded in utf-8 as in the
config file. The xen version I use is 3.2.0. I get the
UnicodeEncodeError: 'ascii' codec can't encode characters in position
0-1: ordinal not in range(128) in the Xend.log(Excerpt pasted below)
I have earlier tried this in xen version 3.0.3 as well. I searched the
user list and google and could not find a lead.

I could not find anything in the xen users list for UnicodeEncodeError.

Please help.

Thanks
Ramachandran

Config file
************

# -*- coding: utf-8 -*-
# Automatically generated. Don't edit
#
#name="newubuntu"
name=unicode("光希",'utf-8').encode('utf-8')
builder="hvm"
memory ="1536"
vif= ['type=ioemu,mac=00:16:3e:a0:0:16,bridge=xenbr0']
device_model="/usr/lib/xen/bin/qemu-dm-sync"
kernel="/usr/lib/xen/boot/hvmloader"
vnc=1
vncunused=0
vnclisten="0.0.0.0"
apic=1
acpi=0
pae=1
vcpus=1
boot='d'
usb=1
usbdevice='tablet'
disk =['file:/vms1/22/vdisk0,ioemu:hda,w',
'file:/vms1/22/ubuntu-8.10-desktop-i386.iso,hdd:cdrom,r']

xend.log
********

Traceback (most recent call last):
  File 
"/root/build/xen-3.2.0/dist/install/usr/lib/python/xen/util/xmlrpclib2.py",
line 131, in _marshaled_dispatch
    response = self._dispatch(method, params)
  File "/usr/lib/python2.4/SimpleXMLRPCServer.py", line 406, in _dispatch
    return func(*params)
  File 
"/root/build/xen-3.2.0/dist/install/usr/lib/python/xen/xend/server/XMLRPCServer.py",
line 72, in domain_create
    info = XendDomain.instance().domain_create(config)
  File 
"/root/build/xen-3.2.0/dist/install/usr/lib/python/xen/xend/XendDomain.py",
line 959, in domain_create
    dominfo = XendDomainInfo.create(config)
  File 
"/root/build/xen-3.2.0/dist/install/usr/lib/python/xen/xend/XendDomainInfo.py",
line 78, in create
    domconfig = XendConfig.XendConfig(sxp_obj = config)
  File 
"/root/build/xen-3.2.0/dist/install/usr/lib/python/xen/xend/XendConfig.py",
line 276, in __init__
    self._sxp_to_xapi(sxp_obj)
  File 
"/root/build/xen-3.2.0/dist/install/usr/lib/python/xen/xend/XendConfig.py",
line 656, in _sxp_to_xapi
    log.debug('_sxp_to_xapi(%s)' % scrub_password(sxp_cfg))
  File 
"/root/build/xen-3.2.0/dist/install/usr/lib/python/xen/xend/XendConfig.py",
line 515, in _parse_sxp
    cfg[key] = val
UnicodeEncodeError: 'ascii' codec can't encode characters in position
0-1: ordinal not in range(128)

xm info:
********

host                   : quad_vmm_2
release                : 2.6.18-prep-xen
version                : #5 SMP Sat Jan 10 18:46:17 IST 2009
machine                : i686
nr_cpus                : 4
nr_nodes               : 1
cores_per_socket       : 4
threads_per_core       : 1
cpu_mhz                : 2666
hw_caps                :
bfebfbff:20100000:00000000:00000140:0408e3fd:00000000:00000001
total_memory           : 8122
free_memory            : 7024
node_to_cpu            : node0:0-3
xen_major              : 3
xen_minor              : 2
xen_extra              : .0
xen_caps               : xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p
xen_scheduler          : credit
xen_pagesize           : 4096
platform_params        : virt_start=0xf5800000
xen_changeset          : unavailable
cc_compiler            : gcc version 4.1.2 20071124 (Red Hat 4.1.2-42)
cc_compile_by          : root
cc_compile_domain      : (none)
cc_compile_date        : Sat Jan 10 18:43:41 IST 2009
xend_config_format     : 4



Locale:
*******

[root@quad_vmm_2 xen]# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
[root@quad_vmm_2 xen]#

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-users] Guest Domain with Japanese names (UTF-8) fails with UnicodeEncodeError:ascii codec cant encode characters - Xen 3.2.0, Ramachandran Radhakrishnan <=