Ok, I found the problem: Tag nesting.

What I was doing:
<c:set var="fullText">
   <str:chomp delimiter=" ">
      <str:substring start="0" end="80">
         <c:out value="${broadcastItem.fullText}" escapeXml="false"/>
      </str:substring>
   </str:chomp>
</c:set>

with the nesting done with tabulators.

When I do this:
<c:set var="fullText"><str:chomp delimiter=" "><str:substring start="0"
end="80"><c:out value="${broadcastItem.fullText}"
escapeXml="false"/></str:substring></str:chomp></c:set>
(everything on one big line)
it all works well.

Seems like Java wasn't too happy with other characters in the string :-)

Thanks & regards,
Eric

-----Original Message-----
From: Henri Yandell [mailto:[EMAIL PROTECTED]]
Sent: Montag, 29. Juli 2002 17:27
To: Tag Libraries Users List
Subject: Re: String tag with "exotic" languages


That's very odd Eric.

The str:substring tag is pretty much just a wrapper for String.substring
itself [a little bit of null protecting is all that is added]. Could you
try and replicate your problem using the underlying String library?

The underlying substring wrapper function I'm using does a negative check
on the end and the start, then if the end value passed in is greater than
the length it makes it equal to the length, then it calls
String.substring.

Do you do any byte->String conversion anywhere?

Hen

On Mon, 29 Jul 2002 [EMAIL PROTECTED] wrote:

> Hi all
>
> Does anyone have experience with the String tag library and "exotic"
> language like Chinese, Japanese, Arabic etc.?
> The problem is: We use the <str:substring...> to cut off after 140
> characters, but this seems to sometimes cut off in the middle of one
> characters, since they're multi-byte characters, which then results in the
> browser not knowing what kind of character it should show.
>
> Regards,
> Eric
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to