#! /usr/bin/perl
use strict;

binmode(STDIN,":utf8");

while(<>) {
 s/(\P{InBasicLatin})/sprintf("\\[u%04X]",  ord($1))/eg;
 print;
}
