I have a server that gets all the åäö (and the like) botched when I upload my stuff to it. I hate to see all the ä stuff when I edit, so I thought a macro to do a project wide search and replace would be nice just before uploading the stuff. I tried to record a macro that would do a project wide find/replace, but it didn't seem to work. Suggestions? A reference to characters can be found at http://dillo.rti-zone.org/Html.testsuite/entities-latin1.html
Andreas
Why not simply make sure your webserver is sending the right "Content-type" HTTP header ? And that it's the same charset in your meta tags ?
2006/2/12, Andreas Wahlin andreaswahlin@bredband.net:
I have a server that gets all the åäö (and the like) botched when I upload my stuff to it. I hate to see all the ä stuff when I edit, so I thought a macro to do a project wide search and replace would be nice just before uploading the stuff. I tried to record a macro that would do a project wide find/replace, but it didn't seem to work. Suggestions? A reference to characters can be found at http://dillo.rti-zone.org/Html.testsuite/entities-latin1.html
Andreas ______________________________________________________________________ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Because I'm currently not in control of it :(
Andreas
On Feb 12, 2006, at 18:06 , Ned Baldessin wrote:
Why not simply make sure your webserver is sending the right "Content-type" HTTP header ? And that it's the same charset in your meta tags ?
2006/2/12, Andreas Wahlin < andreaswahlin@bredband.net>: I have a server that gets all the åäö (and the like) botched when I upload my stuff to it. I hate to see all the ä stuff when I edit, so I thought a macro to do a project wide search and replace would be nice just before uploading the stuff. I tried to record a macro that would do a project wide find/replace, but it didn't seem to work. Suggestions? A reference to characters can be found at http://dillo.rti-zone.org/Html.testsuite/entities-latin1.html
Andreas ______________________________________________________________________ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 12/2/2006, at 18:10, Andreas Wahlin wrote:
[ content-type encoding ] Because I'm currently not in control of it :(
There are a few ways you may be able to set the encoding (from IMHO most to least desired):
.htaccess: Put “AddDefaultCharset utf-8” or (for selected file types) “AddCharset utf-8 .txt .html” in your .htaccess file.
Content negotiation: Name the file e.g. “my_page.html.utf8” to trigger content negotiation.
Sending your own header: If the page is e.g. PHP, you can use something like: Header("Content-Type: text/html; charset=UTF-8");.
If neither of this works, I'd consider sending a kind letter to the host. Converting all files to/from entities from within TextMate isn't feasible, but you could create a script that does it (to current Convert to Entities command is written in Ruby, and could serve as basis for such script).
The PHP header did it, thanks a bunch. I'm not to good with all this meta-magic :)
Andreas
On Feb 13, 2006, at 1:44 , Allan Odgaard wrote:
On 12/2/2006, at 18:10, Andreas Wahlin wrote:
[ content-type encoding ] Because I'm currently not in control of it :(
There are a few ways you may be able to set the encoding (from IMHO most to least desired):
.htaccess: Put “AddDefaultCharset utf-8” or (for selected file types) “AddCharset utf-8 .txt .html” in your .htaccess file.
Content negotiation: Name the file e.g. “my_page.html.utf8” to trigger content negotiation.
Sending your own header: If the page is e.g. PHP, you can use something like: Header("Content-Type: text/html; charset=UTF-8");.
If neither of this works, I'd consider sending a kind letter to the host. Converting all files to/from entities from within TextMate isn't feasible, but you could create a script that does it (to current Convert to Entities command is written in Ruby, and could serve as basis for such script).
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate