Forum Moderators: coopster
Occasionally, if I copy-paste from somewhere into the text box I end up invalidating my RSS feed because I've copied in some strange character. I've never fully worked out why this is.
Example from today "can't" (which looks correct in the browser when I post) becomes:-
canā\x80\x99t
I don't know where it comes from, but is there any way I can code around it?
I'm thinking perhaps if, when posting, I parse the entire string one character at a time looking for ORD values within a certain range [64..whateveritis]?
I don't need code - that I can do, but some help in identifiying what this is and the best approach to dealing with it would be mighty handy :)
TJ
You are cutting and pasting text into a <textarea>? If so, have you checked the data in the POST variable on it's way back to you? Is it OK there or no?
Yes - pasting into a textarea. Untested in the POST var, that's what I want to do now.
text editor
Yes, doing that would fix it, but that's exactly what I seek to avoid having to do.
Just me using it - so can be pretty rough/buggy.
There is an
IMPLIED accept-charsetattribute in the FORM [w3.org] element you could try playing with but I don't think that is going to get you anywhere. I've tried other tricks with the
IMPLIEDattributes before but got nowhere. I'm skeptic about this even being a possibility so I'm not even sure why I'm mentioning it ;-)
I think the biggest issue is determining what the raw POST data looks like, does the
can“tword come over as you expected?