• Robert Heynen-454800 (8/27/2014)


    I am trying to write to a file using .Net. In one column, I am wrapping the output in a unicode char(164)

    i.e.

    select char(164) + ColumnText + char(164)

    The char(164) appears correctly in SQL and in the file I am writing to...as long as I open the file with Notepad.

    However, when I open the file in WordPad, the char(164) ends up char(194)char(164) ColumnText char(194)char(164)

    I've tried to replace the char(194), I've tried chopping the string off using substring to no avail

    Any ideas?

    Quick thought, if the file is a unicode file, use the NCHAR() instead of the CHAR() function.

    😎