summary refs log tree commit diff stats
path: root/nim/rst.pas
diff options
context:
space:
mode:
Diffstat (limited to 'nim/rst.pas')
-rwxr-xr-xnim/rst.pas3
1 files changed, 3 insertions, 0 deletions
diff --git a/nim/rst.pas b/nim/rst.pas
index d5cde5c7e..fb29b7d9f 100755
--- a/nim/rst.pas
+++ b/nim/rst.pas
@@ -314,6 +314,9 @@ begin
   len := length(tokens);
   L.buf := PChar(buffer);
   L.line := 1;
+  // skip UTF-8 BOM
+  if (L.buf[0] = #239) and (L.buf[1] = #187) and (L.buf[2] = #191) then 
+    inc(L.bufpos, 3);
   L.skipPounds := skipPounds;
   if skipPounds then begin
     if L.buf[L.bufpos] = '#' then inc(L.bufpos);