search
Japanese Chinese Nederlands Espanol Italiano Deutsch Francais Twitter Rss Feeds
.NET Framework GroupsView
Deployment Server
.NET Distributed_Apps
.NET
.NET ADO.NET
.NET ASP.NET
.NET ASP.NET Security
.NET ASP.NET Webcontrols
.NET ASP.NET Web Services
.NET Clr
.NET Compact Framework
.NET Drawing
.NET Interop
.NET Micro Porting
.NET Performance
.NET Web Services
.NET Windows Forms
.NET Windows Forms Controls
.NET General
.NET Csharp
.NET Visual Basic
.NET Vc
.NET Security
.NET Xml
Scripting Jscript
Scripting Visual Basicscript
Scripting Wsh
Smartphone Developer
Visual Basic Com
Visual Basic Controls
Visual Basic Crystal
Visual Basic Database Ado
Visual Basic Syntax
Visual Basic Vista Compatibility
Visual Basic Winapi
Vc Atl
Vc Debugger
Vc Language
Vc Mfc
Vc Stl
Visio Developer Visual Basica
Vsnet Debugging
Windows Powershell
Windowsce Embedded Vc
Xml
Xsl

Group SummariesView
.NET Framework
Access
BizTalk
Certifications
CRM
DDK
Exchange Server
FoxPro
French
French .NET
Games
German
German .NET
Graphic Design
IIS
Internet
ISA Server
Italian
Italian .NET
Maps
MCIS
Miscellaneous
Mobile Application Development
Money
MSN
Networking
Office
Ops Mgr
Publisher
Security
SharePoint
Small Business
Spanish
Spanish .NET
SQL Server
Systems Management Server
Transaction Server
Virtual PC / Virtual Server
Visual Studio
Win32
Windows 2000
Windows 2003 Server
Windows 7
Windows Live
Windows Media
Windows Update
Windows Vista
Windows XP
 

View All Microsoft Xml Posts  Ask A New Question 

UTF-8 - Jenny

Thursday, June 21, 2007 12:33 PM

Hi!

Could somebody help me please.
I have a text that I download via XML from somebody's DB and I store it in
my SQL Server as ntext to preserve the UTF-8 formatting. It works well until
I output it on my ASP page. Linebreaks are missing altogether! I can see
them in the source for my HTML. I can also see them in the table in the DB
as little squares between the sentences but the final text on the ASP page
is all in 1 line (ASP page in of course is UTF-8 encoding and all other
chars are displayed perfectly).

Does anybody know if there is a function to display the breaks? Or maybe
somebody knows what stands behind those little squares in the DB table and I
could replace those characters in a simple ASP function before the HTML
output?

Thank you!

Jenny
reply
 

* Jenny wrote in microsoft.public. - Bjoern Hoehrmann

Thursday, June 21, 2007 1:42 PM

* Jenny wrote in microsoft.public.xml:

You have to use an HTML element that preserves the line breaks when
rendering the content. Try to enclose the text inside <pre>...</pre>.
Alternatively you could replace the line breaks with <br> elements or
split the text at line breaks and wrap each inside a <p> element, or
something similar.
--
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
reply

UTF-8 - Neil Smith [MVP Digital Media]

Thursday, June 21, 2007 2:01 PM

On Thu, 21 Jun 2007 18:33:25 +0200, "Jenny" <barroli@wanadoo.fr>




Line breaks are not respected in a browser, which will condense all
consecutive space. HTML and XHTML use the <br /> element instead.

There's a way to show line breaks without running an XSL transform to
convert newlines to <br /> by placing the entire output inside
will show the content with the line breaks, tabs and consecutive
spaces intact (though it will then probably look horrible)

Doug Dawson's site has an XSLT transformation to convert newlines to
see answer #2 from Jeni Tennison.


HTH
Cheers - Neil
------------------------------------------------
Digital Media MVP : 2004-2007
http://mvp.support.microsoft.com/mvpfaqs
reply

Previous Microsoft Xml conversation.