title: D language: I can't split a text block copied from a Wikipedia unicode chart into a list of single-letter strings. Output comes out wrong in editor
body: <p>The MWE and the only code you need to see this is the following:</p>
  <pre><code>module unicode_support;
  
  import std.string;
  
  const wstring unicodeVarSource = `
                                
                                
                                
                                
                                
                                  
                                
                                
                                
                                  
                                      
                                    
                                  
                                
                                
                                
                                      
                                    
                                
                                  
                                        
                                  
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                    
                                
                                
                                
                                
                                
                                
                          ϐ   ϑ   ϒ   ϕ   
  ϰ   ϱ   ϴ   ϵ   ϶         
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                        `;
  
  const bool[wstring] unicodeVars;
  
  //import std.stdio;
  import std.file;
  
  static this() {
     auto letters = unicodeVarSource.split();
     
     write(&quot;debug_output.txt&quot;, letters);
     
  }
  </code></pre>
  <p>Firstly, Visual D's debug console has an issue with displaying Unicode, so I thought we'd better output to file.  Well, after running, open up <code>debug_output.txt</code> in something like Notepad++ and go to Encoding &gt; Utf-8.  The output format is all wrong - and it doesn't display a single character that you can see in the source file.</p>
  <p>What I need is to split the source string into individual letters given the source format as is, because that's exactly how I get the data (copy / pasted from the browser).</p>
  <p>I'm then going to put each letter in a AA entry so that I can determine if a given char in another string is a what my software will consider a variable or not.</p>