0

Im referring to the following request: Split string with split_part in Asian language

It works for Japanese data, however, not for Korean addresses, at least in my case.

 select split_part('중국 베이징   하이디안 디스트릭트', chr(12288), 1)   
"중국 베이징   하이디안 디스트릭트"

Could anyone help?

Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140
Florian Seliger
  • 421
  • 4
  • 16

1 Answers1

1

you seem to use "simple" space here:

select split_part('중국 베이징   하이디안 디스트릭트', ' ', 1)
t-# ;
 split_part
------------
 중국
(1 row)

chr(12288) is "IDEOGRAPHIC space", while in your example yuo use ascii space chr(32)

Vao Tsun
  • 47,234
  • 13
  • 100
  • 132
  • thanks, you are right. However, I do not understand why I use ascii space in Korean addresses, but ideographic space in Japanese addresses. – Florian Seliger Feb 07 '18 at 08:56
  • https://en.wiktionary.org/wiki/ideographic_space "works" both for Korean and Japanese I suppose. I suppose you should ask why you have it for the person who put it there :) – Vao Tsun Feb 07 '18 at 09:20