<p dir="auto">Note the misaligned <code class="notranslate">^~~~~~~</code> below due to the <code class="notranslate">日本語</code> characters(their length is not computed properly?):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ rustc -v main.rs 
main.rs:3:38: 3:43 error: unresolved name `hello`
main.rs:3     println!(&quot;Hello in English: {}&quot;, hello());
                                               ^~~~~
note: in expansion of format_args!
&lt;std macros&gt;:2:42: 2:75 note: expansion site
&lt;std macros&gt;:1:1: 2:77 note: in expansion of println!
main.rs:3:5: 3:47 note: expansion site
main.rs:4:46: 4:53 error: unresolved name `goodbye`
main.rs:4     println!(&quot;Goodbye in Japanese(日本語): {}&quot;, goodbye());
                                                       ^~~~~~~
note: in expansion of format_args!
&lt;std macros&gt;:2:42: 2:75 note: expansion site
&lt;std macros&gt;:1:1: 2:77 note: in expansion of println!
main.rs:4:5: 4:57 note: expansion site
error: aborting due to 2 previous errors"><pre class="notranslate"><code class="notranslate">$ rustc -v main.rs 
main.rs:3:38: 3:43 error: unresolved name `hello`
main.rs:3     println!("Hello in English: {}", hello());
                                               ^~~~~
note: in expansion of format_args!
&lt;std macros&gt;:2:42: 2:75 note: expansion site
&lt;std macros&gt;:1:1: 2:77 note: in expansion of println!
main.rs:3:5: 3:47 note: expansion site
main.rs:4:46: 4:53 error: unresolved name `goodbye`
main.rs:4     println!("Goodbye in Japanese(日本語): {}", goodbye());
                                                       ^~~~~~~
note: in expansion of format_args!
&lt;std macros&gt;:2:42: 2:75 note: expansion site
&lt;std macros&gt;:1:1: 2:77 note: in expansion of println!
main.rs:4:5: 4:57 note: expansion site
error: aborting due to 2 previous errors
</code></pre></div>
<p dir="auto">main.rs is this(compiled with <code class="notranslate">rustc -v main.rs</code>):</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
fn main() {
    println!(&quot;Hello in English: {}&quot;, hello());
    println!(&quot;Goodbye in Japanese(日本語): {}&quot;, goodbye());
}"><pre class="notranslate"><span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-en">println</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"Hello in English: {}"</span>, hello<span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-en">println</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"Goodbye in Japanese(日本語): {}"</span>, goodbye<span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ rustc --version --verbose
rustc 1.0.0-dev (3bf41dafc 2015-01-20 06:45:02 +0000)
binary: rustc
commit-hash: 3bf41dafcfb6c979efb4e2438e047e1a54045eec
commit-date: 2015-01-20 06:45:02 +0000
host: x86_64-unknown-linux-gnu
release: 1.0.0-dev"><pre class="notranslate"><code class="notranslate">$ rustc --version --verbose
rustc 1.0.0-dev (3bf41dafc 2015-01-20 06:45:02 +0000)
binary: rustc
commit-hash: 3bf41dafcfb6c979efb4e2438e047e1a54045eec
commit-date: 2015-01-20 06:45:02 +0000
host: x86_64-unknown-linux-gnu
release: 1.0.0-dev
</code></pre></div>
<p dir="auto">tested in <code class="notranslate">urxvt</code> and <code class="notranslate">xfce4-terminal</code>  (TERM is <code class="notranslate">rxvt-unicode-256color</code> respectively <code class="notranslate">xterm</code>)<br>
Linux 3.19.0-rc5-gec6f34e</p>
<p dir="auto">Thank you.</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="use std::io;

fn main() {
    let s = ~&quot;ZͨA͑ͦ͒͋ͤ͑̚L̄͑͋Ĝͨͥ̿͒̽̈́Oͥ͛ͭ!̏&quot;; while true { break; }
    io::println(s);
}"><pre class="notranslate"><span class="pl-k">use</span> std<span class="pl-kos">::</span>io<span class="pl-kos">;</span>

<span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-k">let</span> s = ~"<span class="pl-v">ZͨA͑ͦ͒͋ͤ͑̚L̄͑͋Ĝͨͥ̿͒̽̈́Oͥ͛ͭ</span>!̏"<span class="pl-kos">;</span> <span class="pl-k">while</span> <span class="pl-c1">true</span> <span class="pl-kos">{</span> <span class="pl-k">break</span><span class="pl-kos">;</span> <span class="pl-kos">}</span>
    io<span class="pl-kos">::</span><span class="pl-en">println</span><span class="pl-kos">(</span>s<span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="main.rs:4:46: 4:67 warning: denote infinite loops with loop { ... }, #[warn(while_true)] on by default
main.rs:4     let s = ~&quot;ZͨA͑ͦ͒͋ͤ̚L̄͑͋Ĝͨͥ̿͒̽̈́Oͥ͛ͭ!̏&quot;; while true { break; }
                                                       ^~~~~~~~~~~~~~~~~~~~~"><pre class="notranslate"><code class="notranslate">main.rs:4:46: 4:67 warning: denote infinite loops with loop { ... }, #[warn(while_true)] on by default
main.rs:4     let s = ~"ZͨA͑ͦ͒͋ͤ̚L̄͑͋Ĝͨͥ̿͒̽̈́Oͥ͛ͭ!̏"; while true { break; }
                                                       ^~~~~~~~~~~~~~~~~~~~~
</code></pre></div>
<p dir="auto">The proper fix for this requires grapheme handling (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="15336577" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/7043" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/7043/hovercard" href="https://github.com/rust-lang/rust/issues/7043">#7043</a>), e.g. some graphemes are double width.</p>