texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Texmacs-dev] Re: Bug with file names with special characters + solution


From: Miguel de Benito Delgado
Subject: [Texmacs-dev] Re: Bug with file names with special characters + solution (QT)
Date: Sat, 6 Nov 2010 19:49:56 +0100

The quick hack did, as expected, break something. As far as I can tell, it shows only in the window title and a counter-hack is to edit qt_view_widget_rep::send (slot s, blackbox val) at line 155 to look like

      view->window() -> setWindowTitle (to_qstring_utf8 (utf8_to_cork(name)));


This is getting uglier by the minute... 

And by the way, I'd like to apologize for all these micro-updates and detailed emails and questions to the list. For all I know this is not the place to discuss port-specific stuff in such detail or to bother people with my ignorance and I might be becoming a bit of a pest. Please bear with me until I'm a bit more familiar with all of this.

Regards,
________________
Miguel de  Benito.


On Sat, Nov 6, 2010 at 18:58, Miguel de Benito Delgado <address@hidden> wrote:
Well... more of a quick hack than a solution. There are way too many layers of string en/decoding for me to grasp right now, but changing line 301 inside qt_chooser_widget_rep::perform_dialog of qt_dialogues.cpp to read

        file = "(url-system " * scm_quote (cork_to_utf8(as_string (u))) * ")";


(i.e. reencoding the cork'ed string as utf8) and adding the necessary #include "converter.hpp" will enable TeXmacsQT to open .tm files with special chars (á,é,ü,ä,...) in their names. This wasn't working for me (SVN rev 3564).

I don't understand why, but applying the same change to the portion of the code which opens image files, a few lines above, will break it. Meaning I get a new error

TeXmacs] cannot read image file '/Users/miguel/whatever with á.jpg' in qt_image_size


 Although, by the way, I can't be sure because I can't see any images at all. All I get is a lot of

TeXmacs] warning: cannot render /Users/miguel/(blabla...)/misc/pixmaps/unknown.ps


This looks like I didn't compile ps support in or something, right? I would gladly investigate this issue further, but I'd need some help. For instance: what is the internal representation of strings? which encoding? which escaping? how does Scheme expect them to be?

Regards,
________________
Miguel de  Benito.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]