0
votes

I am trying to export some data on purpose from SQL Server as HTML file, but Internet explore rendering those files perfectly fine though chrome displaying special characters.

<�html><�head><�style>td {border: solid black 0px; padding-left:5px; padding-right:5px; padding-top:1px; padding-bottom:1px; font-size:8pt; font-family:Arial;} td.thickBorder{ border-top: solid #000 1px;}td.thickTBBorder {border-top: solid #000 1px; border-bottom: solid #000 1px; padding-left:5px; padding-right:5px; padding-top:1px; padding-bottom:1px; font-size:8pt; font-family:Arial;} .style1 { font-size:14pt; font-weight: bold;}<�/style><�/head><�body><�table

1
Export as UTF-8 Without BOMPedram
jiff i am using this query where do i mention UTF-8 wihtout BOM "EXEC master..xp_cmdshell 'BCP "SELECT body FROM [dbo].[COPYTABLE] WHERE [Number] =700" queryout "C:\Updates\AAMN\1740.html" -T -N -SPV3' GOAA.SC
What is the character between the '<' and the 'h' in html? Semantically, there should be no additional character there. Likewise, semantically, there should be no additional character anywhere where the � is showing up. SPECULATION: When this string is being built, the opening bracket is being added with a char(0) byte in it. Depending on how a browser handles those incorrect zero-byte characters, they could either be ignored or be displayed this way. Can you verify the byte value there?Laughing Vergil
I did there is no character in between < and h.AA.SC

1 Answers

0
votes

use below code in <head> tag

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />