1

I noticed a strange behaviour of an application today which I can't explain:

We have an email queue to send mails via ArMailer. In some of them a question mark is inserted from nowhere.

This is from the insert command rails shows me in the server log:

Outstanding: &euro;999.00<br /><br />

What I have in the database afterwards is:

Outstanding: &euro;999.00?<br /><br />

Where could this question mark come from? It happens reproducible only at this position.

Thanks in advance!

Edit:

This does not happen to other similar parts of the email, e.g.

Deposit: &euro;114.00<br /><br />

is written into the database correctly.

stex
  • 861
  • 3
  • 13
  • 21
  • Is it truly a question mark, or is it a character substitution for one missing in the font? Depending on how you look at it (eg, console, etc) from the database, you may not see an accurate representation. What does it look like in the browser? – Jeff Paquette Jul 22 '11 at 15:09
  • @tadman: A normal child class of ActionMailer::ARMailer with `ActionMailer::Base.delivery_method = :activerecord`. I checked the Email object before it is saved and it does not contain the question mark either – stex Jul 22 '11 at 15:09
  • @Jeff Paquette: It's a normal question mark in the browser (the html email). As original email text I get: `Outstanding: =80999.00?`. In the console it's displayed as question mark – stex Jul 22 '11 at 15:11
  • You've likely either specified a character encoding wrong somewhere or don't transliterate between encodings when necessary. You don't show enough info to say more, but start with that and you'll find it. – Craig Stuntz Jul 22 '11 at 16:12
  • @Craig Stuntz: That was my first idea, but if it's just the character encoding, how can a question mark come out of nowhere? I edited my question, other parts of the email don't get question marks. – stex Jul 22 '11 at 17:30
  • When a string contains a character which can't be represented in a certain encoding, sometimes an environment will display a ? in its place. – Craig Stuntz Jul 22 '11 at 19:00
  • I know that, but there is no character which could be represented by this ?. The numeric value is generated by the same function for "Deposit" (which is saved fine) and "Outstanding" (which contains the ?) - also the line breaks seem to be identical. If there is a character which cannot be displayed in the used encoding, where could it come from as this does not affect any other (similar) places in the string? – stex Jul 22 '11 at 21:01

0 Answers0