Localization problem in one dimension: Mapping and escape