Let’s say I want to create a string from a slice of string containing individual Japanese words. The separator is Japanese full length space ( ). The code is as follows:
const separator = " "
func getJoinedString(words []string) string {
joinedString := strings.Join(words, separator)
return joinedString
}
The output I am getting
語る\u3000物語\u3000英語\u3000単語\u3000日本語\u3000語\u3000言語\u3000語りかける\u3000敬語\u3000物語る
Expected output
語る 物語 英語 単語 日本語 語 言語 語りかける 敬語 物語る
Note: For some reason, Discourse is automatically converting Japanese full length space to half length English space. Hence the code + output contains half-length English spaces.