Re: Replacing characters in WEB text

Tech-Archive recommends: Fix windows errors by optimizing your registry



expertware@xxxxxxxxx wrote:

> Dear Joerg and other readers,
>
> I have a couple of question:
> - If I understand well you are suggesting it is better I continue
> using my own function, to be sure all chars
> are encoded correcly. Right ?

Probably. As I said, write a little test and see if HtmlEncode()
encodes all characters you need. If it does, use it.

> - another one regards the FixStringForWEB() function itself
> Do you think it it more convenient to scan the string once
> replacing the chars, or the approach or iterate replace
> using stringbuilder is more appropriate ?

I'd still say you don't need that method at all. You can use all these
characters natively (without HML encoding) in your C#, HTML, or XHTML
source files. By default, ASP.NET uses UTF-8 as request and response
encoding, which is good enough for your purposes. The only thing you
might need to change is fileEncoding in web.config.

Cheers,
--
http://www.joergjooss.de
mailto:news-reply@xxxxxxxxxxxxx
.



Relevant Pages

  • Re: Replacing characters in WEB text
    ... - If I understand well you are suggesting it is better I continue using ... Do you think it it more convenient to scan the string once ... replacing the chars, or the approach or iterate replace ... Prev by Date: ...
    (microsoft.public.dotnet.framework)
  • Re: [Emacs] Kommentieren
    ... ;; completely up to the user to decide, what the string ... "Chars preserved of STRING. ... `CHARS-PRESERVE' must be a parentized expression, ...
    (de.comp.editoren)
  • Re: FASTEST way to try all strings (a until ZZZZZZZZZZZZZZZZZZZZZZZZ)
    ... > It will be a very huge table so I in my opinion. ... > When it would be used, than it should be converted to a string, however ... >> How would an array of Byte be any faster then an array of Char? ... >> array of Byte is needed, however the OP suggested Chars (A to Z, a to z ...
    (microsoft.public.dotnet.languages.vb)
  • Re: FASTEST way to try all strings (a until ZZZZZZZZZZZZZZZZZZZZZZZZ)
    ... > It will be a very huge table so I in my opinion. ... > When it would be used, than it should be converted to a string, however ... >> How would an array of Byte be any faster then an array of Char? ... >> array of Byte is needed, however the OP suggested Chars (A to Z, a to z ...
    (microsoft.public.dotnet.general)
  • Re:(9corr) string
    ... and I want to remove the month in the timestamp for each of the string ... Then advance 4 chars, and copy from +2 to the current pointer until you ... pointer past the year part to reach the month part. ... this guarantee is 'memmove'. ...
    (comp.lang.c)