From 9e8d9ad176dc7691869cf9760bd696061ff4290d Mon Sep 17 00:00:00 2001 From: Asger Ottar Alstrup Date: Fri, 20 Oct 2006 08:06:14 +0000 Subject: [PATCH] - Fix a few unicode bugs - Fix LaTeX export of User guide (the utf8 conversion buffer was too small) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15390 a592a061-630c-0410-9148-cb99ea01b6c8 --- README.Win32 | 60 ++++++++++++++++++++----------------------- src/paragraph_pimpl.C | 10 +++++--- src/support/unicode.C | 3 ++- 3 files changed, 36 insertions(+), 37 deletions(-) diff --git a/README.Win32 b/README.Win32 index 9e61d37640..a1e5f38609 100644 --- a/README.Win32 +++ b/README.Win32 @@ -2,35 +2,31 @@ README for Win32 ================ -LyX has been ported to Win32 using the Cygwin environement. -See README.Cygwin for details. - -Ever since Ruurd Reitsma made his port of LyX 1.3.3 to Windows -available to the general public in 2003, users of LyX/Win have had to -fight to overcome bugs that simply weren't present on other -platforms. Ruurd did a superb job in writing the original port, but -didn't have the resources to squash all the irritating little bugs -discovered by many people using LyX "for real". - -The official LyX line on these LyX/Win ports has always been that -it's nice to know they exist but we won't support them -officially. There were two reasons for this: we didn't have the -necessary knowledge or resources and, until recently, only -closed-source versions of the Qt GUI library existed. The increasing -maturity of the Qt/Win Free project means that this latter point is -no longer true, so we felt that we should make the effort and make -LyX/Win an official part of LyX. - -As a result, LyX 1.3.6 cannot really be classified as a minor bug fix -release, especially for Windows users. Large chunks of the code base -have been touched in an attempt to resolve those problems that -Windows users have found with Ruurd's original ports. We feel -confident that LyX 1.3.6 will be the best ever version of LyX on -Windows. We are not confident, however, that we haven't introduced -any new bugs. - -Detailed installation instructions can be found in INSTALL.Win32 for -those who wish to compile LyX for themselves. For the rest of us, -LyX/Win comes with its own installer, so installation should be pretty -straightforward. As always, more detailed help can be found on the -wiki at http://wiki.lyx.org/Windows. +If you just want to use LyX, get the official Windows installer and +use that. More detailed help can be found on the wiki at +http://wiki.lyx.org/Windows. + +If you want to compile LyX yourself, there are a number of ways to do +that. + +LyX has been ported to Win32 using three different compilers: +Microsoft Visual Studio C++ compiler (VC). MinGW gcc, or Cygwin gcc. + +There are also three different build solutions avaiable: Scons, Cmake +or using the traditional Unix autoconf machinery. + +INSTALL.scons covers how to build using SCons, using any of the three +compilers. + +development/cmake/README.cmake explains how to build using CMake. This +is especially good with VC, because it produces real .sln files. + +See INSTALL.win32 for info about how to build using Cygwin. + +Joost has prepared a .zip package with most of the stuff that you'll +need to compile LyX yourself. Get that from +ftp://ftp.lyx.org/pub/lyx/contrib/lyx-windows-deps-msvc.zip. +Unzip in c:\program files\ and rename the directory to gnuwin32, and +you will find that the CMake solution works almost out of the box, +if you have Visual Studio. + diff --git a/src/paragraph_pimpl.C b/src/paragraph_pimpl.C index 8655111de7..5be1cb3253 100644 --- a/src/paragraph_pimpl.C +++ b/src/paragraph_pimpl.C @@ -555,9 +555,9 @@ void Paragraph::Pimpl::simpleTeXSpecialChars(Buffer const & buf, == "latin1" || font.language()->encoding()->latexName() == "latin9"))) { - os << "\\ensuremath{" - << c - << '}'; + os << "\\ensuremath{"; + os.put(c); + os << '}'; column += 13; } else { os.put(c); @@ -650,7 +650,9 @@ void Paragraph::Pimpl::simpleTeXSpecialChars(Buffer const & buf, case '*': case '[': // avoid being mistaken for optional arguments - os << '{' << c << '}'; + os << '{'; + os.put(c); + os << '}'; column += 2; break; diff --git a/src/support/unicode.C b/src/support/unicode.C index 374e5d25be..b73e559dc7 100644 --- a/src/support/unicode.C +++ b/src/support/unicode.C @@ -64,7 +64,8 @@ iconv_convert(iconv_t * cd, char ICONV_CONST * inbuf = const_cast(reinterpret_cast(buf)); size_t inbytesleft = buflen * sizeof(InType); - size_t const outsize = 10000; + // The preamble of the user guide is more than 11.500 characters, so we go for 32kb + size_t const outsize = 32768; static char out[outsize]; char * outbuf = out; size_t outbytesleft = outsize; -- 2.39.5