有人碰到过 order by asc 前几行里面字符有 + 号,导出csv就会乱码么?

提问者:帅平 问题分类:数据库
有人碰到过 order by asc 前几行里面字符有 + 号,导出csv就会乱码么?示例如下:
create table test.test_w(
    id int,
    age int,
    addr varchar(100),
    wd string
)
ENGINE=OLAP
duplicate KEY( `id`)
DISTRIBUTED BY HASH(`id`) BUCKETS 1
PROPERTIES (
"replication_allocation" = "tag.location.default: 3",
"in_memory" = "false",
"storage_format" = "V2",
"compression" = "ZSTD",
"light_schema_change" = "true",
"disable_auto_compaction" = "false"
);


insert into test.test_w values (2,2, '测试测试', '测试');
insert into test.test_w values (3,3, '测试测试', '测试🍎');
insert into test.test_w values (4,4, '测试测试', '+');

select * from test.test_w order by id ;

排序导出csv格式的话就会出现乱码的问题。
2 个回答
鹿归时心喜
鹿归时心喜
把utf-8改成utf-8-sig应该就可以了,你试试
发布于:6个月前 (10-24) IP属地:四川省
帅平
帅平提问者
还真是好使了,3ks
发布于:6个月前 (10-24) IP属地:四川省
我来回答