Hi,

Isn't it that from the other side, you escape the string, or call a method
that does it before sending it via tcp? That would explain that all the
"\n" become "\\n".

Le mer. 28 août 2019 à 12:17, Durga Someswararao G <
durgasomeswararao...@gmail.com> a écrit :

> Hi Tamás,
>
> But even in other side also I am using golang to convert string into
> bytes. Using tcp connection with net package I am getting data from other
> process.
>
> FYI
> When I try to replace string with \\n it was working fine.
>
> Like below:
> processoutput = strings.Replace("<CustomTag>String 1\n String
> 2</CustomTag>","\\n","'@_@_@'",-1)
>
> On Wed, Aug 28, 2019 at 3:26 PM Tamás Gulácsi <tgulacs...@gmail.com>
> wrote:
>
>> That means that other process speaks some other encoding, not utf-8,
>> which the strings package waits.
>> Use golang.org/x/text/encoding to convert to utf-8.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "golang-nuts" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to golang-nuts+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/golang-nuts/865188f0-405e-45ee-82b9-7f6d24f1d49f%40googlegroups.com
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/CA%2Ba9DGr83pA%2Bvrkg-bYkOs-qjsqxkOgEjoGTmigtJsr0hO287w%40mail.gmail.com
> <https://groups.google.com/d/msgid/golang-nuts/CA%2Ba9DGr83pA%2Bvrkg-bYkOs-qjsqxkOgEjoGTmigtJsr0hO287w%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CANgi334x6aPL-TQOk-4SfwXd4%2BC3hZMB74c797upE9%3DhYzB%3D8w%40mail.gmail.com.

Reply via email to