在带有变音符的表中插入数据是不可能的 [英] Inserting data in table with umlaut is not possible

查看:112
本文介绍了在带有变音符的表中插入数据是不可能的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Cassandra 1.2.5(cqlsh 3.0.2),并尝试在一个小的测试数据库中插入数据,德语字符是不可能的。我从cqlsh获取消息:Bad Request:Input length = 1

I am using Cassandra 1.2.5 (cqlsh 3.0.2) and trying to inserting data in a small test-database with german characters which is not possible. I get back the message from cqlsh: "Bad Request: Input length = 1"

下面是键空间,表和插入的设置。

below is the setup of the keyspace, the table and the insert.

CREATE KEYSPACE test  WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };
use test;

CREATE TABLE testdata (
id varchar,
text varchar,
PRIMARY KEY (id)

这是有效的

insert into testdata (id, text) values ('4711', 'test');

这是不允许的:

insert into testdata (id, text) values ('4711', 'töst`);

- >错误请求:输入长度= 1

我的语言环境是: de_DE.UTF-8

Cassandra 1.2.5是否有Umlaut的问题?

Does Cassandra 1.2.5 has a problem with Umlaut ?

推荐答案

但是,一个不同的东西是,而不是一个单引号,你完成了'töst`一个反引号这不允许我完成语句在cqlsh。当我替换为'töst'它成功,并获得:

I just did what you posted and it worked for me. The one thing that was different however, is that instead of a single quote, you finished 'töst` with a backtick. That doesn't allow me to finish the statement in cqlsh. When I replace that with 'töst' it succeeds and I get:

cqlsh:test> select * from testdata;

 id   | text
------+------
 4711 | töst

这篇关于在带有变音符的表中插入数据是不可能的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆