Mac OS 에서 Sublime Text 사용 중 한글 깨짐 (엔코딩 문제) 또는 자소 분리 문제 해결 방법


: 아래 package를 설치한다. 



Package Control 설치 방법


http://webdir.tistory.com/396




Package Control 설치


서브라임 텍스트는 플러그인들을 관리해주는 도구로 Package Control를 제공하고 있는데, 이를 이용해 손쉽게 플러그인들을 설치 및 제거, 업데이트를 할 수 있다. 서브라임 버전별로 다른 방법이 사용됨.


서브라임 텍스트3의 경우 Sublime Text3 Package Control의 코드를 복사한다.

서브라임 텍스트2의 경우 Sublime Text2 Package Control의 코드를 복사한다.

서브라임 텍스트를 실행하고, Ctrl + `로 콘솔을 불러온다.

복사한 내용을 붙여넣고 엔터를 누른다.



Package 설치


설치를 원하는 플러그인들을 찾아봐야 하는데 https://packagecontrol.io/browse에서 둘러본 후, 설치해도 되고 Sublime Text 플러그인으로 검색해서 원하는 플러그인을 찾아봐도 된다.


기본적인 설치 방법은 아래와 같다.


서브라임 텍스트를 실행한 후, 단축키 Command+Shift+P로 Command Palette를 불러온다.

install을 입력하면 자동완성되는 Package Control: Install Package를 선택하고 엔터를 누른다.

설치를 원하는 플러그인의 이름으로 검색하여 선택한 후, 엔터를 눌러 설치한다.



Package 설치 리스트


서브라임 텍스트를 실행한 후, 단축키 Command+Shift+P로 Command Palette를 불러온다.

list 입력하고 자동완성되는 Package Control: List Package를 선택하고 엔터를 누른다.

설치된 플러그인들이 나열된다.




Package 삭제


서브라임 텍스트를 실행한 후, 단축키 Command+Shift+P로 Command Palette를 불러온다.

remove를 입력하고 자동완성되는 Package Control: Remove Package를 선택하고 엔터를 누른다..

설치된 플러그인들이 리스팅되면 삭제할 것을 선택하고 엔터를 누른다.






한글 깨짐 (EUC-KR 엔코딩 깨지는 경우 해결)




엔코딩 (코덱이 없다고 나올 경우에만 설치하면 됨)




한글 자소 분리 (붙여넣기 시 한글 자소 분리되는 문제 해결)


Posted by fermi

댓글을 달아 주세요

출처: http://macnews.tistory.com/297


Finder를 실행시키고 Command + Shift + G 키를 눌러서 ~/Library/Preferences/com.apple.symbolichotkeys.plist 위치의 파일을 열어서 (TextWrangler)  AppleSymbolicHotKeys > 61 > value > parameters > item 2 항목을 131072 로 수정.


<key>61</key>

<dict>

<key>enabled</key>

<true/>

<key>value</key>

<dict>

<key>parameters</key>

<array>

<integer>32</integer>

<integer>49</integer>

<integer>131072</integer>

</array>

<key>type</key>

<string>standard</string>

</dict>

</dict>




Posted by fermi

댓글을 달아 주세요

Plex Home Theater (https://plex.tv/downloads) 는 XBMC 기반의 Plex 클라이언트로 미려한 인터페이스를 제공하지만 한글 폰트가 그다지 미려하지 못하다.


Preference 메뉴를 통하여 subtitle 폰트를 지정할 수 있도록 되어 있으나, 기본적으로 설치되어 있는 세 가지 폰트 중에서 선택하는 것 만이 가능할 뿐 원하는 한글 폰트를 지정할 수 없다.


수동으로 폰트를 수정하고 싶다면 편법으로 아래와 같이 수정이 가능하다.



1. 자막폰트 수정 방법


/Applications/Plex Home Theater.app/Contents/Resources/XBMC/media/Fonts/ 폴더에 원하는 폰트를 복사해 넣는다. (.ttf 만 가능)


Plex Home Theater 메뉴의 Preference 에서 Subtitle 폰트를 선택한다.


ex: Mac OS X 에 기본 탑재된 서체인 NanumGothic.ttc 파일을 확장자만 ttf 로 바꾸어서 복사해 넣는다. (ex: nanumgothic.ttf)


2. UI 폰트 수정 방법


/Applications/Plex Home Theater.app/Contents/Resources/XBMC/addons/skin.plex/720p/Font.xml 의 내용을 원하는 폰트파일 이름으로 바꿈.


기본적으로 regular 와 bold 를 구분하고 있기 때문에, regular / bold 폰트가 각각의 파일로 되어 있는 폰트를 적용하는 것을 추천한다.


ex: Mac OS X 의 기본 서체인 AppleSDGothicNeo-Regular.otf 와 AppleSDGothicNeo-Bold.otf 를 적용하는 경우...


<?xml version="1.0"?>

<fonts>

<fontset id="Default" unicode="true">

<!--

NOTE:

in skin, search and replace:

1. Bold = Bold

2. Regular = Regular

   -->

<!-- Default -->

<font>

<name>DefaultFont</name>

<filename>AppleSDGothicNeo-Regular.otf</filename>

<size>18</size>

</font>

<!-- special cases -->

<!-- home screen info card plot -->

<font>

<name>HomePlot</name>

<filename>AppleSDGothicNeo-Regular.otf</filename>

<size>16</size>

<linespacing>1.1</linespacing>

</font>

<!-- home screen info card plot -->

<font>

<name>Plot</name>

<filename>AppleSDGothicNeo-Regular.otf</filename>

<size>18</size>

<linespacing>1.1</linespacing>

</font>

<!-- login form description -->

<font>

<name>PINdescription</name>

<filename>AppleSDGothicNeo-Regular.otf</filename>

<size>20</size>

<linespacing>1.2</linespacing>

</font>

<!-- Regular -->

<font>

<name>Regular-12</name>

<filename>AppleSDGothicNeo-Regular.otf</filename>

<size>12</size>

</font>

<font>

<name>Regular-13</name>

<filename>AppleSDGothicNeo-Regular.otf</filename>

<size>13</size>

</font>

<font>

<name>Regular-14</name>

<filename>AppleSDGothicNeo-Regular.otf</filename>

<size>14</size>

</font>

<font>

<name>Regular-16</name>

<filename>AppleSDGothicNeo-Regular.otf</filename>

<size>16</size>

</font>

<font>

<name>Regular-17</name>

<filename>AppleSDGothicNeo-Regular.otf</filename>

<size>17</size>

</font>

<font>

<name>Regular-18</name>

<filename>AppleSDGothicNeo-Regular.otf</filename>

<size>18</size>

</font>

<font>

<name>Regular-19</name>

<filename>AppleSDGothicNeo-Regular.otf</filename>

<size>19</size>

</font>

<font>

<name>Regular-20</name>

<filename>AppleSDGothicNeo-Regular.otf</filename>

<size>20</size>

</font>

<font>

<name>Regular-22</name>

<filename>AppleSDGothicNeo-Regular.otf</filename>

<size>22</size>

</font>

<font>

<name>Regular-24</name>

<filename>AppleSDGothicNeo-Regular.otf</filename>

<size>24</size>

</font>

<font>

<name>Regular-26</name>

<filename>AppleSDGothicNeo-Regular.otf</filename>

<size>26</size>

</font>

<font>

<name>Regular-28</name>

<filename>AppleSDGothicNeo-Regular.otf</filename>

<size>28</size>

</font>

<font>

<name>Regular-30</name>

<filename>AppleSDGothicNeo-Regular.otf</filename>

<size>30</size>

</font>

<font>

<name>Regular-32</name>

<filename>AppleSDGothicNeo-Regular.otf</filename>

<size>32</size>

</font>

<font>

<name>Regular-34</name>

<filename>AppleSDGothicNeo-Regular.otf</filename>

<size>34</size>

</font>

<!-- Bold -->

<font>

<name>Bold-10</name>

<filename>AppleSDGothicNeo-Bold.otf</filename>

<size>10</size>

</font>

<font>

<name>Bold-11</name>

<filename>AppleSDGothicNeo-Bold.otf</filename>

<size>11</size>

</font>

<font>

<name>Bold-12</name>

<filename>AppleSDGothicNeo-Bold.otf</filename>

<size>12</size>

</font>

<font>

<name>Bold-13</name>

<filename>AppleSDGothicNeo-Bold.otf</filename>

<size>13</size>

</font>

<font>

<name>Bold-14</name>

<filename>AppleSDGothicNeo-Bold.otf</filename>

<size>14</size>

</font>

<font>

<name>Bold-15</name>

<filename>AppleSDGothicNeo-Bold.otf</filename>

<size>15</size>

</font>

<font>

<name>Bold-16</name>

<filename>AppleSDGothicNeo-Bold.otf</filename>

<size>16</size>

</font>

<font>

<name>Bold-17</name>

<filename>AppleSDGothicNeo-Bold.otf</filename>

<size>17</size>

</font>

<font>

<name>Bold-18</name>

<filename>AppleSDGothicNeo-Bold.otf</filename>

<size>18</size>

</font>

<font>

<name>Bold-19</name>

<filename>AppleSDGothicNeo-Bold.otf</filename>

<size>19</size>

</font>

<font>

<name>Bold-20</name>

<filename>AppleSDGothicNeo-Bold.otf</filename>

<size>20</size>

</font>

<font>

<name>Bold-22</name>

<filename>AppleSDGothicNeo-Bold.otf</filename>

<size>22</size>

</font>

<font>

<name>Bold-24</name>

<filename>AppleSDGothicNeo-Bold.otf</filename>

<size>24</size>

</font>

<font>

<name>Bold-26</name>

<filename>AppleSDGothicNeo-Bold.otf</filename>

<size>26</size>

</font>

<font>

<name>Bold-28</name>

<filename>AppleSDGothicNeo-Bold.otf</filename>

<size>28</size>

</font>

<font>

<name>Bold-30</name>

<filename>AppleSDGothicNeo-Bold.otf</filename>

<size>30</size>

</font>

<font>

<name>Bold-32</name>

<filename>AppleSDGothicNeo-Bold.otf</filename>

<size>32</size>

</font>

<font>

<name>Bold-34</name>

<filename>AppleSDGothicNeo-Bold.otf</filename>

<size>34</size>

</font>

<font>

<name>Bold-36</name>

<filename>AppleSDGothicNeo-Bold.otf</filename>

<size>36</size>

</font>

<font>

<name>Bold-42</name>

<filename>AppleSDGothicNeo-Bold.otf</filename>

<size>42</size>

</font>

<font>

<name>Bold-48</name>

<filename>AppleSDGothicNeo-Bold.otf</filename>

<size>48</size>

</font>

<font>

<name>Bold-52</name>

<filename>AppleSDGothicNeo-Bold.otf</filename>

<size>52</size>

</font>

<font>

<name>Bold-124</name>

<filename>AppleSDGothicNeo-Bold.otf</filename>

<size>124</size>

</font>

</fontset>

</fonts>


Posted by fermi

댓글을 달아 주세요


참고:


Samsung Galaxy S III (Sprint) 디바이스 코드명: d2spr

1. Requirements:

Linux - Ubuntu 12.04 - 64bit (AFAIK, a 64 bit host is needed to compile JB)
About 14GB of storage for the repository plus about 15GB for building (Recommend 50GB)

If you're using Windows or another OS, grab Virtual Box and install Ubuntu on a VM. It makes a nice development environment.
(Give the VM enough resources - A few cores and 4GB of RAM) 

2. Ubuntu 준비


필수: Ubuntu 12.04.1 LTS Desktop 64-bit

다운로드: http://www.ubuntu.com/start-download?distro=desktop&bits=64&release=lts


2.1 - Ubuntu 한글 입력 환경:

키보드 레이아웃은 English 로 그대로 나두고, Language Support 에서 Korean 추가

Language Support 에서 Input Method 만 ibus를 선택 후 시스템 restart.

이후 태스크 메뉴의 ibus 아이콘을 클릭하여 Preference 에서 Input Method 에 Korean 을 추가하고 Input Method On/Off 단축키를 Shift+space로 설정


2.2 - Time Zone:

Time Zone 서울로 변경


3. Install Ubuntu Packages


3.1 - In terminal:

Code:

sudo apt-get install git-core gnupg flex bison python rar original-awk gawk p7zip-full gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev pngcrush schedtool


sudo apt-get install libc6-dev x11proto-core-dev libx11-dev libgl1-mesa-dev mingw32 tofrodos python-markdown libxml2-utils


sudo apt-get install g++-multilib lib32z1-dev ia32-libs lib32ncurses5-dev lib32readline-gplv2-dev gcc-multilib g++-multilib xsltproc


4. Install JAVA


NOTE: Must be JDK 1.6 - Don't use other versions.


4.1 - Download Java JDK for Linux 64-bit from Java site: (http://www.oracle.com/technetwork/java/javase/downloads/index.html)

Correct file will be something like: jdk-6u##-linux-x64.bin , where ## is the version number and will change with updates.


4.2 - Move jdk-6u##-linux-x64.bin to your home directory


4.3 - Remove any other java packages from system:

Code:

sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*


4.4 - Install Java JDK:

Code:

sudo mkdir -p /opt/java/64/

sudo cp jdk-6u##-linux-x64.bin /opt/java/64

sudo su -

cd /opt/java/64

chmod +x jdk-6u##-linux-x64.bin

./jdk-6u##-linux-x64.bin

exit


4.5 - Add JDK PATH to .bashrc:

Code:

vi ~/.bashrc

Add these lines to .bashrc:

Code:

# Java PATHs

export JAVA_HOME=/opt/java/64/jdk1.6.0_##

export PATH=$PATH:$JAVA_HOME/bin


5. Install Android SDK


5.1 - Setup directories:

Code:

cd ~

mkdir android

cd android

mkdir sdk


5.2 - Download Android SDK from http://developer.android.com/sdk/index.html


5.3 - Extract SDK contents to ~/android/sdk


5.4 - Add Android SDK Path:

Code:

vi ~/.bashrc

Enter the Following:

Code:

#Android PATH

export PATH=$PATH:~/android/sdk

export PATH=$PATH:~/android/sdk/platform-tools

export PATH=$PATH:~/android/sdk/tools


5.5 - Add Extra Path For Device:

Code:

sudo vi /etc/udev/rules.d/99-android.rules

Enter this:

Code:

#Samsung

SUBSYSTEM==usb, SYSFS{idVendor}==04e8, MODE=0666

SUBSYSTEM=="usb", ATTRS{idVendor}=="####:####", SYMLINK+="android_adb", MODE="0666" GROUP="plugdev"

TEST=="/var/run/ConsoleKit/database", \

RUN+="udev-acl --action=$env{action} --device=$env{DEVNAME}"

Save/close file and run:

Code:

sudo chmod +x /etc/udev/rules.d/99-android.rules


5.6 - Close and open new terminal.


5.7 - Install Android SDK Tools

Code:

android

Check Android SDK Tools and Android SDK platform-tools and Install them


6. Install Repository


6.1 - Download Repo:

Code:

mkdir -p ~/bin

mkdir -p ~/android/system

curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo

chmod a+x ~/bin/repo


6.2 - Add Repo Path:

Code:

vi ~/.bashrc

Enter the following:

Code:

export PATH=$PATH:~/bin


6.3 - Close and open new terminal.


6.4 - Initialize Repository & Sync:

Code:

cd ~/android/system/

repo init -u git://github.com/CyanogenMod/android.git -b jellybean

repo sync -j16

NOTE: If you have trouble syncing due to connection issues, try repo sync -j1. It's slower but some ISPs have issues with -j16

Want to make sure you didn't get any connection errors and have the complete repository? Just run the repo sync command again. It can't give you ANY errors.

Go get a beer. And another. And another...


6.5 - Get Device Specific Repos:

Code:

. build/envsetup.sh && breakfast d2spr

Get more beer...


6.6 - Extract files from phone:

NOTE: You need to have cm10 installed on the phone.

Connect phone to pc and in terminal type:

Code:

adb root

cd ~/android/system/device/samsung/d2spr/

./extract-files.sh


6.6 - Get proprietary files:

Code:

cd ~/android/system

git clone https://github.com/TheMuppets/proprietary_vendor_samsung.git vendor/samsung


6.7 - Download Extra Files:

Code:

~/android/system/vendor/cm/get-prebuilts


6.8 - Add Toolchain PATH:

Code:

vi ~/.bashrc

Enter the following:

Code:

#Android Toolchain PATH

export ARCH=arm

export CCOMPILE=$CROSS_COMPILE

export CROSS_COMPILE=arm-eabi-

export PATH=$PATH:/home/YOUR-USERNAME/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin


6.9 - Close and open new terminal.


7. Building Android


Code:

cd ~/android/system

. build/envsetup.sh && brunch d2spr

Go get a beer. And another. And another...


8. Install on Phone


8.1 - Copy your .zip file from ~/android/system/out/target/product/d2spr/cm-10-XXXXXXXXX-UNOFFICIAL-d2spr.zip to the root of the SD card.


8.2 - Optional: Download Google Apps for Jelly Bean from http://goo.im/gapps and place it on the root of the SD card.


8.3 - Flash both of these .zip files from recovery.

Call your mother. She misses you.


...and that's it.


9. How to update?


Code:

cd ~/android/system

repo sync -j16

make installclean


find ./out/ -name 'build.prop' | xargs rm

find ./out/ -name 'cm_d2spr-target_files-eng.*.zip' | xargs rm

rm -rf ~/android/system/out

NOTE: If you have trouble syncing due to connection issues, try repo sync -j1. It's slower but some ISPs have issues with -j16

...get beer, build and install.


Want to go "Steve Jobs" on the Android build? (Warning: Will take a gazillion years to re-build everything again)

Run:

Code:

make clobber


10. 한글 SMS 코드 수정


http://wwww.matpclub.com/?m=bbs&bid=imbed&uid=91803

http://code.google.com/p/cyanogenmod/issues/detail?id=2410

http://code.google.com/p/cyanogenmod/issues/attachmentText?id=2410&aid=8690011502386790186&name=sms_mms_korean.diff

sms_mms_korean.diff


10.1 - sms_mms_korean.diff:

diff --git a/core/java/com/google/android/mms/pdu/CharacterSets.java b/core/java/com/google/android/mms/pdu/CharacterSets.java

index 4e22ca5..78441b3 100644

--- a/core/java/com/google/android/mms/pdu/CharacterSets.java

+++ b/core/java/com/google/android/mms/pdu/CharacterSets.java

@@ -40,6 +40,7 @@ public class CharacterSets {

     public static final int ISO_8859_8  = 0x0B;

     public static final int ISO_8859_9  = 0x0C;

     public static final int SHIFT_JIS   = 0x11;

+    public static final int EUC_KR      = 0x26;

     public static final int UTF_8       = 0x6A;

     public static final int BIG5        = 0x07EA;

     public static final int UCS2        = 0x03E8;

@@ -66,6 +67,7 @@ public class CharacterSets {

         ISO_8859_8,

         ISO_8859_9,

         SHIFT_JIS,

+        EUC_KR,

         UTF_8,

         BIG5,

         UCS2,

@@ -87,6 +89,7 @@ public class CharacterSets {

     public static final String MIMENAME_ISO_8859_8  = "iso-8859-8";

     public static final String MIMENAME_ISO_8859_9  = "iso-8859-9";

     public static final String MIMENAME_SHIFT_JIS   = "shift_JIS";

+    public static final String MIMENAME_EUC_KR      = "euc-kr";

     public static final String MIMENAME_UTF_8       = "utf-8";

     public static final String MIMENAME_BIG5        = "big5";

     public static final String MIMENAME_UCS2        = "iso-10646-ucs-2";

@@ -110,6 +113,7 @@ public class CharacterSets {

         MIMENAME_ISO_8859_8,

         MIMENAME_ISO_8859_9,

         MIMENAME_SHIFT_JIS,

+        MIMENAME_EUC_KR,

         MIMENAME_UTF_8,

         MIMENAME_BIG5,

         MIMENAME_UCS2,

diff --git a/core/java/com/google/android/mms/pdu/PduPersister.java b/core/java/com/google/android/mms/pdu/PduPersister.java

index 9fdd204..09c2214 100644

--- a/core/java/com/google/android/mms/pdu/PduPersister.java

+++ b/core/java/com/google/android/mms/pdu/PduPersister.java

@@ -425,8 +425,13 @@ public class PduPersister {

                     if (ContentType.TEXT_PLAIN.equals(type) || ContentType.APP_SMIL.equals(type)

                             || ContentType.TEXT_HTML.equals(type)) {

                         String text = c.getString(PART_COLUMN_TEXT);

-                        byte [] blob = new EncodedStringValue(text != null ? text : "")

-                            .getTextString();

+                        byte [] blob;

+                        try {

+                            blob = (text != null ? text : "").getBytes(CharacterSets.getMimeName(charset));

+                        } catch (Exception e) {

+                            Log.w(TAG, "Failed to decode an MMS text.", e);

+                            blob = new byte[0];

+                        }

                         baos.write(blob, 0, blob.length);

                     } else {

 

@@ -741,7 +746,7 @@ public class PduPersister {

                     || ContentType.APP_SMIL.equals(contentType)

                     || ContentType.TEXT_HTML.equals(contentType)) {

                 ContentValues cv = new ContentValues();

-                cv.put(Telephony.Mms.Part.TEXT, new EncodedStringValue(data).getString());

+                cv.put(Telephony.Mms.Part.TEXT, new EncodedStringValue(part.getCharset(), data).getString());

                 if (mContentResolver.update(uri, cv, null, null) != 1) {

                     throw new MmsException("unable to update " + uri.toString());

                 }

diff --git a/telephony/java/com/android/internal/telephony/SimRegionCache.java b/telephony/java/com/android/internal/telephony/SimRegionCache.java

index 2cf6d25..7825781 100644

--- a/telephony/java/com/android/internal/telephony/SimRegionCache.java

+++ b/telephony/java/com/android/internal/telephony/SimRegionCache.java

@@ -17,14 +17,58 @@

 package com.android.internal.telephony;

 

 import android.os.SystemProperties;

+import android.util.Log;

 

 public class SimRegionCache {

+

+    private static final String LOG_TAG = "GSM";

+    private static final String PROPERTY_CACHED_MCC = "gsm.cachedMcc";

+

     public static final int MCC_UNSET  = Integer.MIN_VALUE;

     public static final int MCC_KOREAN = 450;

 

     private static int regionFromMcc = MCC_UNSET;

 

     /**

+     * Updates the cache of the SIM card region code manually with the

+     * specified MCC (Mobile Country Code).  Specify null if you want

+     * to get the ICC operator numeric from SystemProperties.

+     */

+    public static void setRegion(String mcc) {

+        if (mcc == null) {

+            if (regionFromMcc != MCC_UNSET) {

+                return;

+            }

+            mcc = SystemProperties.get(PROPERTY_CACHED_MCC, null);

+            if (mcc == null) {

+                mcc = SystemProperties.get(TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC, null);

+            }

+        }

+        if (mcc == null || mcc.length() < 3) {

+            regionFromMcc = MCC_UNSET;

+            return;

+        }

+

+        mcc = mcc.substring(0, 3);

+

+        try {

+            regionFromMcc = Integer.parseInt(mcc);

+        } catch (Exception e) {

+            Log.w(LOG_TAG, "Invalid MCC: " + mcc, e);

+            return;

+        }

+

+        // Store the cached MCC in the system properties to avoid class loader issues.

+        SystemProperties.set(PROPERTY_CACHED_MCC, mcc);

+

+        if (regionFromMcc == MCC_KOREAN) {

+            Log.w(LOG_TAG, "Korean SIM detected - alternative message encoding might be applied on the received SMS and MMS messages.");

+        } else {

+            Log.d(LOG_TAG, "Detected MCC: " + regionFromMcc);

+        }

+    }

+

+    /**

      * Returns the region as read from the MCC of the SIM card.

      * If the property {@link TelephonyProperties#

      * PROPERTY_ICC_OPERATOR_NUMERIC}

@@ -34,17 +78,7 @@ public class SimRegionCache {

      */

     public static int getRegion() {

         if (regionFromMcc == MCC_UNSET) {

-            String plmn = SystemProperties.get(

-                    TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC,

-                    null);

-

-            if (plmn != null && plmn.length() >= 3) {

-                try {

-                    regionFromMcc = Integer.parseInt(plmn.substring(0, 3));

-                } catch(Exception e) {

-                    // Nothing that can be done here.

-                }

-            }

+            setRegion(null);

         }

         return regionFromMcc;

     }

diff --git a/telephony/java/com/android/internal/telephony/gsm/SIMRecords.java b/telephony/java/com/android/internal/telephony/gsm/SIMRecords.java

index b4e7b63..ddd1c5d 100644

--- a/telephony/java/com/android/internal/telephony/gsm/SIMRecords.java

+++ b/telephony/java/com/android/internal/telephony/gsm/SIMRecords.java

@@ -35,6 +35,7 @@ import com.android.internal.telephony.IccUtils;

 import com.android.internal.telephony.IccVmFixedException;

 import com.android.internal.telephony.IccVmNotSupportedException;

 import com.android.internal.telephony.MccTable;

+import com.android.internal.telephony.SimRegionCache;

 

 import java.util.ArrayList;

 

@@ -498,6 +499,8 @@ public final class SIMRecords extends IccRecords {

 

                 Log.d(LOG_TAG, "IMSI: " + imsi.substring(0, 6) + "xxxxxxxxx");

 

+                SimRegionCache.setRegion(imsi);

+

                 if (mncLength == UNKNOWN) {

                     // the SIM has told us all it knows, but it didn't know the mnc length.

                     // guess using the mcc

diff --git a/telephony/java/com/android/internal/telephony/gsm/SmsMessage.java b/telephony/java/com/android/internal/telephony/gsm/SmsMessage.java

index d87f395..331648c 100644

--- a/telephony/java/com/android/internal/telephony/gsm/SmsMessage.java

+++ b/telephony/java/com/android/internal/telephony/gsm/SmsMessage.java

@@ -791,7 +791,7 @@ public class SmsMessage extends SmsMessageBase{

             String ret;

 

             try {

-                ret = new String(pdu, cur, byteCount, "KSC5601");

+                ret = new String(pdu, cur, byteCount, "EUC-KR");

             } catch (UnsupportedEncodingException ex) {

                 // Should return same as ENCODING_UNKNOWN on error.

                 ret = null;

@@ -1075,11 +1075,21 @@ public class SmsMessage extends SmsMessageBase{

                     break;

 

                 case 1: // 8 bit data

-                case 3: // reserved

                     Log.w(LOG_TAG, "1 - Unsupported SMS data coding scheme "

                             + (dataCodingScheme & 0xff));

                     encodingType = ENCODING_8BIT;

                     break;

+

+                case 3: // reserved (or KSC5601 for Korean SIM)

+                    Log.w(LOG_TAG, "3 - Unsupported SMS data coding scheme "

+                            + (dataCodingScheme & 0xff));

+                    if (SimRegionCache.getRegion() == SimRegionCache.MCC_KOREAN) {

+                        Log.w(LOG_TAG, "Korean SIM, using KSC5601 for decoding.");

+                        encodingType = ENCODING_KSC5601;

+                    } else {

+                        encodingType = ENCODING_8BIT;

+                    }

+                    break;

                 }

             }

         } else if ((dataCodingScheme & 0xf0) == 0xf0) {


11. 기타


설치 전에 순정 롬을 백업하고 나중에 리스토어할 수 있는가?


Posted by fermi

댓글을 달아 주세요

AirVideo Server Add-on

http://www.readynas.com/forum/viewtopic.php?f=48&t=49079


설치 후 한글 자막 폰트 설정 방법


설정파일 위치: /c/webroot/AirVideo/readynas.properties

Add-on을 설치하면 webroot 라는 CIFS Share 가 자동으로 생기므로 CIFS 로 접근해도 되고, SSH 를 활성화해서 접근해도 됨.

(예를 들면:

path.ffmpeg = ./AirVideo/ffmpeg

path.mp4creator = /usr/local/bin/mp4creator

path.faac = /usr/local/bin/faac

password = 

subtitles.encoding = utf-8

subtitles.font = NanumGothic

#subtitles.size = 130

folders = Media:/c/media/Videos)


JRE에 한글 폰트 추가


AirVideo Server 에 JRE가 포함되어 있음

/c/webroot/AirVideo/jre1.6.0_20/lib/fonts 에 필요한 TTF 폰트를 복사해 넣음.

(예를 들면:

NanumGothic.ttf

NanumGothicBold.ttf

NanumGothicExtraBold.ttf)


fonts.dir 파일을 수정


http://confluence.goldpitcher.co.kr/pages/viewpage.action?pageId=96075806 참고


fonts.dir 파일을 열고 맨 상단 숫자값에 추가하는 폰트수를 더하여 수정 (예를 들면 48 인데 3개 폰트 추가 시 51으로 수정)

fonts.dir 파일 맨 하단에 추가한 폰트파일에 대한 기술내용을 추가 

(예를 들면:

NanumGothic -b&h-nanumgothic-medium-r-normal-0-0-0-0-c-0-ksc5601.1987-0                            

NanumGothicBold -b&h-nanumgothicbold-medium-r-normal-0-0-0-0-c-0-ksc5601.1987-0                    

NanumGothicExtraBold -b&h-nanumgothicextrabold-medium-r-normal-0-0-0-0-c-0-ksc5601.1987-0)


참고:

http://www.devbb.net/viewtopic.php?f=29&t=939

http://theeye.pe.kr/entry/installation-of-iPhone-air-video-server-for-linux-machine

Posted by fermi

댓글을 달아 주세요

http://kldp.org/node/63419
http://pc-to-mac-changer.blogspot.com/2010/02/shell-script-text-unicode.html

Shell script 이용

한개의 파일에 대해서 변환

#/bin/bash
iconv -c -f euc-kr -t utf-8 $1 > $1.tmp
mv $1.tmp $1

폴더 내의 smi, srt, txt 파일에 대해서 모두 변환

find "$1" -name "*.smi" -o -name "*.srt" -o -name "*.txt" | while read filename
do
tempName=${filename}~temp~.txt
mv "$filename" "$tempName"
iconv -c -f euc-kr -t utf-8 "$tempName" > "$filename"
rm "$tempName"
done




Posted by fermi

댓글을 달아 주세요