Closed sujit-baniya closed 4 years ago
I used following piece of code:
enc := data.FindEncoding("Đừng buồn thế dù ngoài kia vẫn mưa nghiễng rợi tý tỵ") fmt.Println(enc)
Above code results: &{} instead of actual encoding interface among:
&{}
var ( // GSM7BIT is gsm-7bit encoding. GSM7BIT Encoding = &gsm7bit{} // ASCII is ascii encoding. ASCII Encoding = &ascii{} // LATIN1 encoding. LATIN1 Encoding = &iso88591{} // CYRILLIC encoding. CYRILLIC Encoding = &iso88595{} // HEBREW encoding. HEBREW Encoding = &iso88598{} // UCS2 encoding. UCS2 Encoding = &ucs2{} )
Am I missing something?
@itsursujit Almost encoding object has no fields, thats why it print &{}.
You could try out:
fmt.Println(enc == data.UCS2) // output: true
I will close this issue. Thank you @itsursujit
I used following piece of code:
Above code results:
&{}
instead of actual encoding interface among:Am I missing something?