Question: I am trying to replace the valuse in a list with the long format name.

```
value_list = ['Gi1/0/8', 'Gi1/0/31', 'Gi1/0/32', 'Gi1/0/33', 'Gi1/0/34', 'Gi1/0/23', 'Gi1/0/27']

```

I am running the following script:

```
for value in value_list:
    value = re.sub(r'Gi', 'GigabitEthernet', value)
    print value
print value_list

```

This is my out put:

```
GigabitEthernet1/0/8
GigabitEthernet1/0/31
GigabitEthernet1/0/32
GigabitEthernet1/0/33
GigabitEthernet1/0/34
GigabitEthernet1/0/23
GigabitEthernet1/0/27

```

I just need to change the values in the list, it seems doing it all wrong. Can anyone help me do this in an efficient manner so i dont need to create another list from the individual outputs??

Answer: 
By looking at this line in the stack trace
`initdb: invalid locale settings; check LANG and LC_* environment variables`,

It seems you need to set env variables for locale as described here: <https://github.com/zonkyio/embedded-postgres/issues/11>.

```
export LC_CTYPE="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"

```
```java
EmbeddedPostgres pg = EmbeddedPostgres.builder().start();

//Get the connection to postgres db
Statement dbSetup = pg.getDatabase("postgres", "postgres").getConnection().createStatement();

//Then create a db as per your requirement with appropriate user and password if required.
dbSetup.execute("create database testdatabase;");
dbSetup.execute("CREATE USER testadmin WITH PASSWORD 'testadmin' CREATEDB;");
dbSetup.execute("ALTER USER testadmin WITH SUPERUSER;"); 
dbSetup.execute("ALTER ROLE testadmin SUPERUSER;");

// Connect to the created database and work
pg.getDatabase("testadmin", "testdatabase").getConnection().createStatement().executeQuery("select 1;");

```