[haiku-webkit-commits] r364 - webkit/trunk/WebCore/platform/haiku

  • From: webkit@xxxxxxxxxxxxxxx
  • To: haiku-webkit-commits@xxxxxxxxxxxxx
  • Date: Fri, 02 Apr 2010 15:05:45 +0000

Author: stippi
Date: Fri Apr  2 15:05:45 2010
New Revision: 364
URL: http://mmlr.dyndns.org/changeset/364

Log:
Replace a certain representation of blank lines which WebCore generates for
selected text with plain line breaks. This fixes for example pasting code from
a web page into a Pe window and getting GCC errors like these when compiling:
  error: stray '\302' in program
  error: stray '\240' in program

Don't know if there may be more problems with UTF8 characters that GCC doesn't
like, but it fixes the known issues so far.

Modified:
   webkit/trunk/WebCore/platform/haiku/PasteboardHaiku.cpp

Modified: webkit/trunk/WebCore/platform/haiku/PasteboardHaiku.cpp
==============================================================================
--- webkit/trunk/WebCore/platform/haiku/PasteboardHaiku.cpp     Fri Apr  2 
14:21:02 2010        (r363)
+++ webkit/trunk/WebCore/platform/haiku/PasteboardHaiku.cpp     Fri Apr  2 
15:05:45 2010        (r364)
@@ -71,8 +71,15 @@
     }
 
     BString string(frame->selectedText());
+
+       // Replace unwanted representation of blank lines
+       const char* utf8BlankLine = "\302\240\n";
+       string.ReplaceAll(utf8BlankLine, "\n");
+
     data->AddData("text/plain", B_MIME_TYPE, string.String(), string.Length());
 
+// Code which may help to find other unwanted parts in the selected plain text 
besides
+// "utf8BlankLine" above.
 //printf("text/plain: '%s'\n", string.String());
 //int32 charCount = min_c(string.Length(), 10);
 //const char* stringData = string.String();

Other related posts:

  • » [haiku-webkit-commits] r364 - webkit/trunk/WebCore/platform/haiku - webkit