Converting を from Hiragana to Romaji


I realize that it's usually better to just learn / use hiragana but I have
been asked to look into coding up a solution to convert from Hiragana/Katakana
to the modified Hepburn Romaji.

One point I would like some advice on is the conversion of:

[code]

    かいものをします
    
[/code]

I see some converters changing this to:

[code]

    kaimonooshimasu
    
[/code]

and others to:

[code]

    kaimonowoshimasu
    
[/code]

Is there one or the other that I should aim for with the Modified Hepburn?




As [Eiríkr
Útlendi](https://japanese.stackexchange.com/users/5229/eir%c3%adkr-%c3%9atlendi)
mentioned in a comment, the correct romanization for を in modified Hepburn is
`o`.

For traditional Hepburn, the correct romanization is `wo`.

To blatantly steal his wikipedia link as well, [here's the
reference](https://en.wikipedia.org/wiki/Hepburn_romanization#Particles). For
a programming project, you should be able to use the table at the end of that
page for a dict/hash translation. (with some special handling for ん)

> kaimonooshimasu

is correct for modified hepburn, but since you lack the word seperation
functions of kanji/kana alternation with romaji, people usually seperate words
with spaces when using romaji.

